Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
Hi , FranK this is the sort card iam using ...
When i removed the Continuation character it showed sysntax error at teh end of FIRST IF THEN ..Therefore i added..
Code:
SORT FIELDS=COPY
OUTFIL FNAMES=FILE1,
IFTHEN=(WHEN=(1,10,CH,EQ,C'CTRL1 : *.',AND,
113,15,CH,EQ,C'PAGE NO : PPPPP'),
OVERLAY=(35:
C' xxxxxxxxxxxxxxxxxxx MU'
22X,SEQNUM,5,ZD,5X)) -
OUTFIL FNAMES=FILE1, -
IFTHEN=(WHEN=(1,10,CH,EQ,C'AAAAAAAAAA',AND, -
34,65,CH,EQ, -
C'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', -
AND,
113,20,CH,CH,EQ,C'DATE : DD/MM/YYYY')
OVERLAY=(35:
C' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '
22X,&DATE)),
IFTHEN=(WHEN=(1,11,CH,EQ,C'CTRL2 : *.*',AND,
34,65,CH,EQ,65C'C',AND,
113,18,CH,CH,EQ,C'TIME : HH:MM:SS'))
OVERLAY=(35:
C' '
22X,&TIME))
**************************** Bottom of Data ****************************
In the below sort card i removed the multiple OUTFILs , and it is showing the error in the Character comparison string which is perfect....
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I can't tell what columns any of your characters are in. When I try to recreate your control statements, I don't get the same messages you did. I need to know exactly what your control statements look like and I can't figure that out from posts on this board.
It looks to me like the apostrophe after MU is in column 72 indicating continuation rather then the end of the string, but I can't tell for sure. And in either case, you're missing a comma between MU' and 22X on the next line. In my previous post, I suggested using nX for n blanks instead of all of those blanks in the middle of the string so you won't have to go up to column 72, but you ignored that.
I still think you have nonblank characters in column 72 indicating continuation and if so, you need to fix that. I'd also suggest removing the dashes since they aren't needed and they could be causing problems.
If you want me to look at this further, you need to send me a note offline (yaeger@us.ibm.com) with your complete JCL and control statements in a plain text file, and the messages you received in another plain text file, so I can see what you're actually doing. Please put "DFSORT" somewhere in your Subject line to catch my attention.