From: said on
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

From: Anonymous on
In article <59d00676-31bf-4b91-8d7d-ed819cf6a56e(a)i28g2000yqa.googlegroups.com>,
said <said.ali.ahmed(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.

Please do your own homework.

DD
From: Doug Miller on
In article <59d00676-31bf-4b91-8d7d-ed819cf6a56e(a)i28g2000yqa.googlegroups.com>, said <said.ali.ahmed(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.

1) How you go about doing that depends on the operating system.
2) How do you expect to learn anything by asking someone to give you the
answers? Do your own homework. That's how I got my degree -- if you can't get
yours the same way, you should pursue a different course of studies.
From: Richard on
On Jun 22, 2:44 am, 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

Microfocus has special routines that you can call to get file date,
size, etc. Other brands may have similar features - RTFM.

If all else fails do a CALL "SYSTEM" to run the operating system
directory listing program (DIR, ls -l, ..) redirecting output (>) to a
file which you can then read.

If an input file is line sequential then the only way to know the
number of lines is to read the file and count them. Fixed length
uncompressed [record] sequential files can be calculated from the file
size and record size, everything else you have to count.

From: HeyBub on
said 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.
>

In Windows, COBOL has no easy way of doing this.

If I HAD to do it, I'd write a routine to access the directory as a file,
rummage around to find the file at issue, then decode the random bits
according to the layout of the directory as provided by the OS vendor.

A much (MUCH) easier way - at least in Windows - is to invoke the
appropriate APIs to get the file length, various dates, etc.