Page 1 of 1

Syncsort - Reformat my report

PostPosted: Sun Mar 13, 2011 12:54 pm
by suzeet1
Hi
I want to reformat one report. My report is Fixed block and record length of 132. Below is the input record layout.

JOB                   START DATE           START TIME           END DATE                END TIME
[color=#FF0000]PBRD1000
                           
                      10/02/2011           10:00:00             10/02/2011              10:30:00
PBRD1000
[/color]
PBRD2000
                           
                      10/02/2011           23:00:00             11/02/2011              00:30:00
PBRD2000

PBRD3000
                           
                      11/02/2011           01:00:00             11/02/2011             01.30:00
PBRD3000

PBRD4000
                           
                      11/02/2011           01:40:00             11/02/2011              01:45:00
PBRD4000



I want to reformat my report. The reformatter job will run thrice in a day. It will check for Current date and time and report those JOB names and it's details which ran in between 8 Hours range. In the above scenario, suppose my Reformatter job ran at 2AM, the following will be the output. It will exclude the PBRD1000 run details. Also, put the job name and it's detail in oneline.


PBRD2000     10/02/2011           23:00:00             11/02/2011              00:30:00
PBRD3000     11/02/2011           01:00:00             11/02/2011              01.30:00
PBRD4000     11/02/2011           01:40:00             11/02/2011              01:45:00

Re: Reformat my report

PostPosted: Sun Mar 13, 2011 1:13 pm
by dick scherrer
Hello and welcome to the forum,

Which version and release of the sort are you using?

Re: Reformat my report

PostPosted: Mon Mar 14, 2011 9:47 am
by suzeet1
Thank you.
I am using SyncSort
SYNCSORT FOR Z/OS 1.3.2.2R

Re: Syncsort - Reformat my report

PostPosted: Tue Mar 15, 2011 9:19 pm
by Thampy
If I understand your requirement correctly, you want the job run details to be captured in a single line after excluding the job PBRD1000. Since you have not mentioned the column positions of the Start date,Start time etc, I am assuming the Start date field is from position 19-26 and job name starts from column position1. Hope the below sort will satisfy your requirement.

//STEP020 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
PBRD1000

10/02/2011 10:00:00 10/02/2011 10:30:00
PBRD1000

PBRD2000

10/02/2011 23:00:00 11/02/2011 00:30:00
PBRD2000

PBRD3000

11/02/2011 01:00:00 11/02/2011 01.30:00
PBRD3000

PBRD4000

11/02/2011 01:40:00 11/02/2011 01:45:00
PBRD4000
//*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(1,8,CH,NE,C' '),PUSH=(1:1,8))
OUTFIL OMIT=(1,8,CH,EQ,C'PBRD1000',OR,19,8,CH,EQ,C' ')
//*


Output listed below:
PBRD2000 10/02/2011 23:00:00 11/02/2011 00:30:00
PBRD3000 11/02/2011 01:00:00 11/02/2011 01.30:00
PBRD4000 11/02/2011 01:40:00 11/02/2011 01:45:00