In a record format, I have several journal fields (replicated from a few of the DSPJRN outfile fields) and then several user fields for our app.
There are several file formats, one for each user file.
But, I want to use only one pgm routine to process all these files.
So, here is a file samples:
***** Cust file ******
05 JOENTTY pic x(2).
05 JODATE pic x(6).
05 JOTIME pic x(10).
05 Cust-nbr pic x(10).
05 Cust-name pic x(30).
The JOURNAL fields all line up in columns from one file to another, (start in the same position), but the user fields do not (the first user field always starts after JOTIME).
Does COBOL provide a way to reference everything AFTER the JOTIME field? WITHOUT using a hard-coded number?
For example, I am using
If record-fields (19:) =
Which is bad news if the journal fields expand.
I would prefer something like:
If record-fields (all fields after JOTIME -> to the end of record)
Note: the field Cust-nbr is other names in other files, such as Item-nbr, vendor-nbr, etc.
Clear as mud I am sure.
Can I rename the concatenation of all fields after JOTIME to a new name to use?
Any other ideas how to avoid reference by offset, which will be problematic down the road?
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
As an Amazon Associate we earn from qualifying purchases.