Sorry for the long winded explanation but need to set the context of the issue.
Background:
I have a print file (LRECL=133, RECFM=FBA) that I am working with that contains
report data and is a rather large file 2,000 cylinders.
I need to extract some statistics from the file but the format needs some
tweaking to make the records consistent.
There are two types of records, a report online record and possibly (not
always) a report offline record.
The dataset is so large that it is difficult to move around. I can exclude all
of the headers and blank lines in the file and reduce the size of the dataset
to about half or 1,000 cyl which is still fairly hefty.
I am very limited to the tools I can use and the only real utility I can use is
DFSORT. I am familiar with the typical use of DFSORT but do not have any
experience using the IFTHEN/WHEN GROUP/PUSH commands and although I can follow
some of the online examples, none really match what I am trying to do.
Request:
I would like to generate statistics from these records, i.e. number of
online/offline entries per report but I need to make them consistent by
identifying each record as belonging to a report.
For example, after removing all the headers and blank lines from the dataset so
I am only working with the data, REPORT01 is an online report version and right
below it I need to insert/replace the following "CART" records with REPORT01 so
that they identify to that report and so on.
IOW, extract columns 1-10 for the report name, go to the next record and if
first 4 characters are blank, insert the previous record's report name.
This way, all records will have an identity that I can then hopefully process
in smaller chunks.
REPORT ID DATE/TIME CREATED PAGES STATUS DATASET-NAME
---------- -------------------- ----- ------ ------------
REPORT01 10/13/2018 02:30.05 55 ACTIVE MYDSN.ARCHIVE.V6...
REPORT01 10/12/2018 02:30.06 57 ACTIVE MYDSN.ARCHIVE.V6...
UNIT VOL SER EXP DATE SEQ NUM MIGR DATASET NAME
-------- ------- ---------- ------- -----------------
CART 004016 02/10/2046 0016 MYDSN.MIG.D9930.U02...
CART 013773 02/16/2046 0003 MYDSN.MIG.D9930BU.V...
REPORT ID DATE/TIME CREATED PAGES STATUS DATASET-NAME
---------- -------------------- ----- ------ ------------
REPORT02 09/30/2018 14:01.03 4 MIGRATED MYDSN.ARCHIVE.V6...
UNIT VOL SER EXP DATE SEQ NUM MIGR DATASET NAME
-------- ------- ---------- ------- -----------------
CART 002363 01/31/2043 1109 MYDSN.MIG.D9925.U14...
CART 024147 01/08/2046 0030 MYDSN.MIG.D9925BU.V...
REPORT02 06/30/2018 14:00.48 4 MIGRATED MYDSN.ARCHIVE.V6...
UNIT VOL SER EXP DATE SEQ NUM MIGR DATASET NAME
-------- ------- ---------- ------- -----------------
CART 002363 01/31/2043 1016 MYDSN.MIG.D9925.U14...
CART 008034 10/22/2045 0015 MYDSN.MIG.D9925BU.V...
Hope this make sense!
Thanks,
Gil.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN