Hi,
I want to create a output file by using different columns of input file using sort utility.
Input file:
Code:
JOBNAME = BVVV600Z VFG USERID DETAIL REPORT
PROGRAM = BEVY600Z FOR THE MONTH OF MAR 2010 -
REPORTED = REV60002 05555 -
USER ID USER NAME #OF RECEIPTS
========= ===========================
TA0707NAG N. GALLMEYER 15
===============================================
TOTAL 15
===============================================
JOBNAME = BVVV600Z VFG USERID DETAIL REPORT
PROGRAM = BVVV600Z FOR THE MONTH OF MAR 2010 -
REPORTID = RVV60002 04444 -KKINK CASTING
USER ID USER NAME #OF RECEIPTS
========= ===========================
T2320NW NOEL WOOD 6
**************
Output file should look like:
Code:
05555 T0707NG N. GALLMEYER 15
04444 T2320NW NOEL WOOD 6
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
weejai,
Use the following DFSORT JCL
Code:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
JOBNAME = BVVV600Z VFG USERID DETAIL REPORT
PROGRAM = BEVY600Z FOR THE MONTH OF MAR 2010 -
REPORTID = REV60002 05555 -
USER ID USER NAME #OF RECEIPTS
========= ===========================
TA0707NAG N. GALLMEYER 15
===============================================
TOTAL 15
===============================================
JOBNAME = BVVV600Z VFG USERID DETAIL REPORT
PROGRAM = BVVV600Z FOR THE MONTH OF MAR 2010 -
REPORTID = RVV60002 04444 -KKINK CASTING
USER ID USER NAME #OF RECEIPTS
========= ===========================
T2320NW NOEL WOOD 6
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,8,CH,EQ,C'REPORTID'),
PUSH=(81:40,6))
OUTFIL BUILD=(81,6,1,74),
INCLUDE=(81,1,CH,GT,C' ',AND,2,1,CH,EQ,C'T')
//*
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
This is failing with SYNTAX ERROR:
Expat did not mention that today is not Psychic Day. . . On Psychic Day some here at the forum can read minds. Not today, so you have to post something for us to work with.
Saying "if didn't work" just wastes everyone's time and does not get you an answer. . .
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
CICS Guy wrote:
There is no WHEN=GROUP in Syncsort, you'll need to use a logical expression instead.....
With older versions of SyncSort it's true, however, starting SyncSort for z/OS, Release 1.3, level 1.3.2 of SyncSort for z/OS Release IFTHEN parameter has been enhanced to include the WHEN=GROUP subparameter.
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
weejai wrote:
please suggest me if anyone has any idea why its happening
Well, idea is simple, your shop is using "SYNCSORT FOR Z/OS 1.3.0.3R" in which WHEN=GROUP subparameter is not supported.
Aside: There is one way round, kolusu has shown you a way, those line of codes works on some logic - try to understand that logic and try to extend that to your version of SyncSort.