From: SkippyPB on
On Mon, 21 Jun 2010 22:59:11 +0300, Binyamin Dissen
<postingid(a)dissensoftware.com> wrote:

>On Mon, 21 Jun 2010 07:44:26 -0700 (PDT) said <said.ali.ahmed(a)gmail.com>
>wrote:
>
>:>Does any body know how a routine in cobol that will display the
>:>information of the input/ outpout file, for example if my input file
>:>is A then it will display information like creation date, number of
>:>records etc.
>
>Run the SWA to extract the dsname and then open the VTOC as a keyed random
>file and extract the data from the format 1 DSCB.

Good answer :)

Regards,
--

////
(o o)
-oOO--(_)--OOo-



"You have to learn to crawl before you can grovel."
-- Art Grinath
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve
From: Fred Mobach on
Alistair wrote:

> On Jun 21, 3:44�pm, said <said.ali.ah...(a)gmail.com> wrote:
>
>> Does any body know how a routine �in �cobol that will display the
>> information of the input/ outpout file, for example if my input file
>> is A then it will display information like creation date, number of
>> records etc.
>
> You will find that the answer to your question does depend very much
> on the system upon which you intend running the Cobol program. In the
> answers that others have provided Binyamin's answer applies to IBM
> mainframes and is probably not applicable to your system. Judging by
> your other queries (listed in the profile) you work or are
> investigating opportunities under Windows systems. Heybub and Richard
> have outlined solutions applicable to a Windows system so I would
> suggest:
>
> 1. Look at using APIs (Application Program Interface) calls.
> 2. Where information is lacking then try to use the CALL 'SYSTEM'
> interface.
> 3. Use the DIR command to obtain information.
> 4. If, after this, you don't know the number of records, then either
> read the file and count each record or take the file size and divide
> by the record size. If the record size is variable then read the file.

Or, at least on POSIX based systems e.g. UNIX / Linux / cygwin, the
command wc -l can deliver the number of records. Which can be called as
others have already stated by CALL "system".
--
Fred Mobach - fred(a)mobach.nl
website : https://fred.mobach.nl
.... In God we trust ....
.. The rest we monitor ..
From: Bill Gunshannon on
In article <4c20f82d$0$279$14726298(a)news.sunsite.dk>,
Fred Mobach <fred(a)mobach.nl> writes:
> Alistair wrote:
>
>> On Jun 21, 3:44�pm, said <said.ali.ah...(a)gmail.com> wrote:
>>
>>> Does any body know how a routine �in �cobol that will display the
>>> information of the input/ outpout file, for example if my input file
>>> is A then it will display information like creation date, number of
>>> records etc.
>>
>> You will find that the answer to your question does depend very much
>> on the system upon which you intend running the Cobol program. In the
>> answers that others have provided Binyamin's answer applies to IBM
>> mainframes and is probably not applicable to your system. Judging by
>> your other queries (listed in the profile) you work or are
>> investigating opportunities under Windows systems. Heybub and Richard
>> have outlined solutions applicable to a Windows system so I would
>> suggest:
>>
>> 1. Look at using APIs (Application Program Interface) calls.
>> 2. Where information is lacking then try to use the CALL 'SYSTEM'
>> interface.
>> 3. Use the DIR command to obtain information.
>> 4. If, after this, you don't know the number of records, then either
>> read the file and count each record or take the file size and divide
>> by the record size. If the record size is variable then read the file.
>
> Or, at least on POSIX based systems e.g. UNIX / Linux / cygwin, the
> command wc -l can deliver the number of records. Which can be called as
> others have already stated by CALL "system".

Only for one particular class of data files. Line sequential with
newline record terminators.

bill

--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
billg999(a)cs.scranton.edu | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>
From: Pete Dashwood on
Alistair wrote:
> On Jun 22, 2:22 pm, Alistair <alist...(a)ld50macca.demon.co.uk> wrote:
>> On Jun 21, 3:44 pm, said <said.ali.ah...(a)gmail.com> wrote:
>>
>>> Hi
>>
>>> Does any body know how a routine in cobol that will display the
>>> information of the input/ outpout file, for example if my input file
>>> is A then it will display information like creation date, number of
>>> records etc.
>>
>>> Thanks
>>
>> You will find that the answer to your question does depend very much
>> on the system upon which you intend running the Cobol program. In the
>> answers that others have provided Binyamin's answer applies to IBM
>> mainframes and is probably not applicable to your system. Judging by
>> your other queries (listed in the profile) you work or are
>> investigating opportunities under Windows systems. Heybub and Richard
>> have outlined solutions applicable to a Windows system so I would
>> suggest:
>>
>> 1. Look at using APIs (Application Program Interface) calls.
>> 2. Where information is lacking then try to use the CALL 'SYSTEM'
>> interface.
>> 3. Use the DIR command to obtain information.
>> 4. If, after this, you don't know the number of records, then either
>> read the file and count each record or take the file size and divide
>> by the record size. If the record size is variable then read the
>> file.
>>
>> Kulin Remailer's answer is unhelpful. S/He clearly has issues. Since
>> His/Her remarks could be interpreted as racist then that individual
>> should be concerned about their liability to prosecution in their
>> country of residence (and any other country they wish to travel to/
>> through). A brief look at His/Her profile indicates subject matter
>> including shooting people in the head so I would suggest that the
>> issues run deep. Kulin Remailer can be found at
>> remai...(a)reece.net.au. If that is Australia then a charge of racism
>> would be applicable. Perhaps contacting reece.net.au regarding the
>> offense would be in order.
>
> And now I have found out that the coward behind the offensive email is
> hiding behind a freely available anonymizer.

Imagine for a moment what it must be like to be him/her... All that hatred
just burning you up. I have to believe this is not a happy person. Perhaps
we all get what we deserve... :-)

Pete.

--
"I used to write COBOL...now I can do anything."


From: Anonymous on
In article <88dau9FeioU1(a)mid.individual.net>,
Pete Dashwood <dashwood(a)removethis.enternet.co.nz> wrote:

[snip]

>Perhaps
>we all get what we deserve... :-)

As opposed to the words of Gandalf the Grey: 'There are those who live who
deserve to die and those who die who deserve life. Can you give it to
them, Mr Frodo Baggins?'

DD