Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
If you were to include all the jcl for the step,
and also the sysout msgs produced by your sort product - which usually point to the syntax error
someone could possibly take the time to look thru.
but to ask someone to just look at your control cards,
I think is abit much!
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Quote:
but to ask someone to just look at your control cards,
I think is abit much!
Personally, i believe this goes way beyond "abit much". It is completely lazy and somewhat rude. . .
The error(s) presented by the run describe the problem(s) quite well. If you will not do any research at all to resolve your error, you should at least post the info provided by the execution as well as the jcl used. . . As DBZ has already mentioned. . .
What im trying to do is, if the input records to the outfil is empty, i just need to write header1, else if there are records then header1, header3, data, trailer3,trailer1
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
most often in the sysout/sort messages,
when WER268A OUTFIL STATEMENT : SYNTAX ERROR occurs
there is usually a $ or * or some marker under the colum in the line,
usually at the point the sort parser decided there was an error.
that is the reason we want the complete sort message details.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
You will help others help you if you will use the Code tag. . .
This may be your problem - from the manual:
Quote:
The control statement can begin in column 2 through column 69. If labels are used, the control statement must be separated from the label by at least one blank.
SYNCSORT FOR Z/OS 1.3.2.1R U.S. PATENTS: 4210961, 5117495 (C) 200
* XXXXXXXXXXXXX. * z/OS 1.
SYNCSORT LICENSED FOR CPU SERIAL NUMBER XXXXX, MODEL XXX XXX
SYSIN :
JOINKEYS FILE=F1,
FIELDS=(501,3,A)
JOINKEYS FILE=F2,
FIELDS=(1,3,A)
REFORMAT FIELDS=(F1:1,511)
SORT FIELDS=(501,3,A,12,9,A,21,9,A),FORMAT=CH
OUTREC FIELDS=(1:1,3,4:SEQNUM,8,ZD,RESTART=(501,3),12:12,500)
OUTFIL FNAMES=OFILE511,
INCLUDE=(501,1,CH,NE,C'G'),
REMOVECC,VLTRIM=X'AA',
SECTIONS=(501,3,SKIP=0L,
HEADER3=(1:'BOF',
4:6' ',
10:'PERSHING ',
19:'PORTFOLIO HOLDINGS DATA OF ',
47:&DATE=(MD4/),
57:' TO REMOTE ',
68:501,3,
72:' BEGINS HERE ',
86:&DATE=(MD4/),
96:1' ',
97:&TIME,
105:395' ',
500:'A',
501:501,3),
TRAILER3=(1:'EOF',
4:6' ',
10:'PERSHING ',
19:'PORTFOLIO HOLDINGS DATA OF ',
47:&DATE=(MD4/),
57:' TO REMOTE ',
68:501,3,
72:' ENDS HERE. ',
84:'TOTAL DETAIL RECORDS: ',
106:COUNT=(TO=ZD,LENGTH=10),
116:380' ',
500:'Z',
501:501,3))
OUTFIL FNAMES=OFTP511,
INCLUDE=((501,1,CH,EQ,C'F'),OR,
(501,1,CH,EQ,C'C'),OR,
(501,1,CH,EQ,C'D'),OR,
(501,1,CH,EQ,C'E'),OR,
(501,1,CH,EQ,C'H'),OR,
(501,1,CH,EQ,C'J'),OR,
(501,1,CH,EQ,C'&')),
REMOVECC,
SECTIONS=(501,3,SKIP=0L,
HEADER3=(1:'BOF',
4:6' ',
10:'PERSHING ',
19:'PORTFOLIO HOLDINGS DATA OF ',
47:&DATE=(MD4/),
57:' TO REMOTE ',
68:501,3,
72:' BEGINS HERE ',
86:&DATE=(MD4/),
96:1' ',
97:&TIME,
105:395' ',
500:'A',
501:501,3),
TRAILER3=(1:'EOF',
4:6' ',
10:'PERSHING ',
19:'PORTFOLIO HOLDINGS DATA OF ',
47:&DATE=(MD4/),
57:' TO REMOTE ',
68:501,3,
72:' ENDS HERE. ',
84:'TOTAL DETAIL RECORDS: ',
106:COUNT=(TO=ZD,LENGTH=10),
116:380' ',
500:'Z',
501:501,3))
OUTFIL FNAMES=ONJE511,
INCLUDE=(501,1,CH,EQ,C'N'),
REMOVECC,
SECTIONS=(501,3,SKIP=0L,
HEADER3=(1:'BOF',
4:6' ',
10:'PERSHING ',
19:'PORTFOLIO HOLDINGS DATA OF ',
47:&DATE=(MD4/),
57:' TO REMOTE ',
68:501,3,
72:' BEGINS HERE ',
86:&DATE=(MD4/),
96:1' ',
97:&TIME,
105:395' ',
500:'A',
501:501,3),
TRAILER3=(1:'EOF',
4:6' ',
10:'PERSHING ',
19:'PORTFOLIO HOLDINGS DATA OF ',
47:&DATE=(MD4/),
57:' TO REMOTE ',
68:501,3,
72:' ENDS HERE. ',
84:'TOTAL DETAIL RECORDS: ',
106:COUNT=(TO=ZD,LENGTH=10),
116:380' ',
500:'Z',
501:501,3))
OUTFIL FNAMES=OGM511,
OMIT=(501,1,CH,NE,C'G'),
REMOVECC,
HEADER1=(1:'O*N01',
54:'74',
501:'G'),
IFTHEN=(WHEN=(12,9,CH,NE,C' '),
*
SECTIONS=(501,3,SKIP=0L,
HEADER3=(1:'O*N05',
6:501,3,
9:504,3,
12:8' ',
20:'PPES',
24:30' ',
54:'74',
56:445' ',
501:501,3),
TRAILER3=(1:'O*N95',
6:501,3,
9:504,3,
12:8' ',
20:'PPES',
24:30' ',
54:'74',
56:445' ',
501:501,3))),
TRAILER1=(1:'O*N99',
54:'74',
501:'G')
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
This is my whole sysout message,
actually im trying to change the program, which split the input file into four output file on particular condition and also add header n trailewr to those files. Im trying to include HEADER inside the IFTHEN condition, I dont know whether we can use HEADER inside IFTHEN condition.
(Edited by A. Margulies to protect company information.)