Prev: Readibility of code was Re: Functional Programming book review
Next: (Usual) request to change subject - for "thread drift"
From: Binyamin Dissen on 21 Jun 2010 15:59 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. -- Binyamin Dissen <bdissen(a)dissensoftware.com> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies.
From: Alistair on 22 Jun 2010 09:22 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.
From: Alistair on 22 Jun 2010 09:25 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.
From: Howard Brazee on 22 Jun 2010 10:55 On Mon, 21 Jun 2010 07:44:26 -0700 (PDT), 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. > >Thanks CoBOL doesn't generally use plug-in routines. Sure, you might have an OO compiler and fancy interface. But with something this simple, it's easier to just write code. But post what you've done so far, and list your results, and we can assist in debugging your program. -- "In no part of the constitution is more wisdom to be found, than in the clause which confides the question of war or peace to the legislature, and not to the executive department." - James Madison
From: Howard Brazee on 22 Jun 2010 11:01
On Tue, 22 Jun 2010 08:55:11 -0600, Howard Brazee <howard(a)brazee.net> wrote: >But post what you've done so far, and list your results, and we can >assist in debugging your program. Oh, I forgot to say - we need to know your environment. This is always true, but more so with I/O issues. In this particular instance, a mainframe programmer and a Windows programmer will be doing things differently. -- "In no part of the constitution is more wisdom to be found, than in the clause which confides the question of war or peace to the legislature, and not to the executive department." - James Madison |