View previous topic :: View next topic
|
Author |
Message |
manoopatil
New User
Joined: 07 Dec 2003 Posts: 56 Location: Montreal
|
|
|
|
Can someone suggest how to get rid of the error in the following JCL.
JCL STEP USED:
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FILE1,DISP=SHR
// DD DSN=FILE2,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,8,CH,A)
INREC IFTHEN=(WHEN=GROUP,
BEGIN=(9,4,CH,EQ,C'RPT='),PUSH=(41:13,8))
OUTFIL INCLUDE=(41,8,CH,GT,C' ',AND,9,4,CH,NE,C'RPT='),
BUILD=(1,8,41,8,9,5)
/*
|
FILE1:-
AY19501 RPT=RAY19501
AY19505 RPT=RAY19505
AY19506 RPT=RAY19506
FILE2:-
AY19501 5286 119705/29/07
AY19501 5287 67705/30/07
AY19501 5288 71305/31/07
AY19505 5288 71705/31/07
AY19505 5289 70606/01/07
AY19506 5289 70706/01/07
AY19506 5291 80906/05/07
AY19506 5292 123606/06/07
ERROR MESSAGES:
SYNCSORT FOR Z/OS 1.2.2.3R U.S. PATENTS: 4210961, 5117495 (C) 2005 SYNCSO
z/OS 1.8.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER 1C2AD, MODEL 2096 U03 LICEN
SYSIN :
SORT FIELDS=(1,8,CH,A)
INREC IFTHEN=(WHEN=GROUP,
*
BEGIN=(9,4,CH,EQ,C'RPT='),PUSH=(41:13,8))
OUTFIL INCLUDE=(41,8,CH,GT,C' ',AND,9,4,CH,NE,C'RPT='),
BUILD=(1,8,41,8,9,5)
WER268A INREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Thanks in Advance
Regards
-Manohar |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
this is not Your first post on on sort issues
You should know by now that WER..... messages are SYNCSORT related
and You should post to the jcl forum
I' ll move the topic |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Quote: |
SYNCSORT FOR Z/OS 1.2.2.3R
WER268A INREC STATEMENT : SYNTAX ERROR |
SyncSort for z/OS 1.2 does not contain support for the WHEN=GROUP function.
You can accomplish this using SyncSort's JOIN feature instead. I'll post an example shortly. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Try this:
Code: |
//SORT1 EXEC PGM=SORT
//SORTJNF1 DD *
AY19501 5286
AY19501 5287
AY19501 5288
AY19505 5286
AY19505 5287
AY19506 5286
AY19506 5287
//SORTJNF2 DD *
AY19501 RPT=RAY19501
AY19505 RPT=RAY19505
AY19506 RPT=RAY19506
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,8,A)
JOINKEYS FILES=F2,FIELDS=(1,8,A)
REFORMAT FIELDS=(F2:1,8,13,8,F1:8,5)
SORT FIELDS=COPY
/* |
|
|
Back to top |
|
|
manoopatil
New User
Joined: 07 Dec 2003 Posts: 56 Location: Montreal
|
|
|
|
Yes!!! It worked perfectly fine. Thank you so much Alissa!
Many programmers including me write a cobol program for this kind of functionality!
Thanks
-Manohar |
|
Back to top |
|
|
|
|