I got a requirement to get 2 or more Consecutive records having value '9' on position 16. For example in below data I need only the records that are highlighted in blue. I do not need other data as some of them still contain value '9' on position 16 but there is not another '9' record following.
Total file length is 652 FB. There is no Key on this file. I just need 2 or more Consecutive records having value '9' on position 16. INCLUDE COND is not working as it gets ALL '9' records. Please let me know if this can be done using DFSORT/ICETOOL.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I am not able to run the above cards using sort. But it worked fine in ICEMAN.
If DFSORT is installed correctly at your site, then PGM=SORT and PGM=ICEMAN would both use DFSORT.
You need to explain what you mean by "I am not able to run the above cards using sort". Show the job you used and the messages you received from the successful and "failing" jobs.
Joined: 20 Dec 2008 Posts: 43 Location: New Jersey
Hi Frank,
Sorry for the delay!!! Its my mistake only... its working fine in both PGM=SORT and PGM=ICEMAN
But please educate me on this why i am getting the below statements.
Code:
//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=input ,DISP=SHR
//SORTOUT DD DSN=output ,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(200,200),RLSE),
// DCB=(LRECL=652,RECFM=F,DSORG=PS)
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(653:SEQNUM,8,ZD,RESTART=(16,1))),
IFTHEN=(WHEN=GROUP,
BEGIN=(653,8,ZD,EQ,1,AND,16,1,ZD,EQ,9),
PUSH=(661:1,652),RECORDS=2)
OUTFIL INCLUDE=(653,8,ZD,EQ,2,AND,16,1,ZD,EQ,9),
BUILD=(661,652,/,001,652)
JCK2222E INREC (LINE=04): INIT, NONE, ANY OR LOGICAL EXPRESSION IS
EXPECTED AFTER WHEN=
JCK2222E INREC (LINE=05): PARSE, BUILD OR OVERLAY IS EXPECTED AFTER
GROUP,
JCK2218E INREC (LINE=05): INVALID NUMBER (P OR M) IS SPECIFIED
JCK2218E INREC (LINE=05): INVALID NUMBER (P OR M) IS SPECIFIED
JCK2218E INREC (LINE=05): INVALID NUMBER (P OR M) IS SPECIFIED
JCK2218E INREC (LINE=05): INVALID NUMBER (P OR M) IS SPECIFIED
JCK2245E INREC (LINE=05): COMMA AFTER BEGIN CLAUSE CANNOT BE USED
TOGETHER WITH GROUP CLAUSE
JCK2201E PUSH IS AN INVALID STATEMENT (LINE=06)
but when i use PGM=ICEMAN, I didnt get those error msgs...
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
I suspect the JCK* messages are from some "JCL Checker". These products are often behind the capability of the sort product.
When SORT was detected, it tried to validate the sort control statements, but when ICEMAN was the PGM=, the JCL check was not performed for the sort control statements - only the actual JCL.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Raj,
Hmmm ... it appears that the brain-dead JCL Checker at your site thinks that PGM=SORT should be checked but PGM=ICEMAN shouldn't. Not too bright considering that they invoke the same program.
As Dick says, these JCL Checkers are too often not up-to-date on DFSORT syntax.
Talk to your System Programmers about NOT using the JCL Checker for PGM=SORT or PGM=ICEMAN since it obviously can't handle DFSORT's syntax correctly.