View previous topic :: View next topic
Author
Message
nagarajan.dharani New User Joined: 27 Dec 2006Posts: 36 Location: Chennai
Hi,
Could anyone help me in solving the syntax error for the below
sort jcl
Code:
//STEP005 EXEC PGM=SORT
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,BI,TO=ZD,LENGTH=10,
16,1,
37,1,
50,45,TRAN=LTOU,
SQZ=(SHIFT=LEFT,PREBLANK=C'.,'),
3X)
/*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INFILE,DISP=SHR
//SORTOUT DD DISP=(,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(10000,10000),RLSE),
// DSN=OUTFILE
I am getting the following error
,, OUTREC FIELDS=(1,4,BI,TO=ZD,LENGTH=10,
16,1,
37,1,
50,45,TRAN=LTOU,
SQZ=(SHIFT=LEFT,PREBLANK=C'.,'),
$
ICE007A E SYNTAX ERROR
3X)
$
ICE007A 0 SYNTAX ERROR
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E7-K24705
Thanks,
Dharani
Back to top
rajatbagga Active User Joined: 11 Mar 2007Posts: 199 Location: india
Hi,
I see , the syntax of SQZ is (p,m,SQZ) where 'p' is the postion and 'm' is lenght of data you want to perform SQZ funtion...
For eg. in your OUTREC below:
Code:
OUTREC FIELDS=(1,4,BI,TO=ZD,LENGTH=10,
16,1,
37,1,
50,45,TRAN=LTOU,p,m,
SQZ=(SHIFT=LEFT,PREBLANK=C'.,'),
3X)
please correct me if i am wrong...
Back to top
nagarajan.dharani New User Joined: 27 Dec 2006Posts: 36 Location: Chennai
Hi rajat,
Thanks for your reply
The p,m what you are specifying is 50,45
If I use the TRAN=LTOU seperately without SQZ it works. Similarly if I use SQZ without TRAN=LTOU it works.
Both the SQZ and TRAN functions are required for the field in 50,45.
But when both the funtions are specified I get a syntax error.
Thanks,
Dharani
Back to top
rajatbagga Active User Joined: 11 Mar 2007Posts: 199 Location: india
Hi nagarajan.dharani,
I still feel that you cannot use TRAN=LTOU and SQZ both at some time on same fileds. I think you either have to suppy 50.45 for SQZ also or you can use OVERLAY function after your OUTREC statement for applying SQZ on 50,45.
I hope i am clear...
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Dharani,
rajatbagga is right. The syntax error is issued because you don't have p,m,SQZ=(...). If you want to use TRAN=LTOU on 50,45 and then use SQZ on the result in 50,45, you can do it with DFSORT control statements like this:
Code:
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,
BUILD=(1,4,BI,TO=ZD,LENGTH=10,
16,1,
37,1,
50,45,TRAN=LTOU,
3X)),
IFTHEN=(WHEN=INIT,
OVERLAY=(50,45,SQZ=(SHIFT=LEFT,PREBLANK=C'.,')))
Back to top
Please enable JavaScript!