Gil Cardenas,
It is quite simple with DFSORT to push the contents to the next records.
Using WHEN=GROUP you can push anything you want.
Here is an UNTESTED example . I assumed the REPORT01,REPORT02.... values
start at position 1 and the values CART records have spaces in the first 4
bytes. I pushed 35 bytes on the next records ( Report id, date and time )
to position 134.
Run this example as is and then check out the contents at position 134.
Once you have verified that you have what you need then you simply add this
1 statement to extract ONLY the cart records OUTFIL INCLUDE=
(8,4,CH,EQ,C'CART')
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
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...
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,4,CH,NE,C' '),PUSH=(134:1,35))
//*
Further if you have any questions please let me know
Thannks,
Kolusu
DFSORT Development
IBM Corporation
IBM Mainframe Discussion List <[email protected]> wrote on
10/29/2018 05:05:47 AM:
> 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 IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN