I am using Syncsort and attempting to process a file as follows:
1) Sort fields.
2) Convert ZD to PD; example of ZD formats are '000000000002.459000-' and '0000000000000005.42-'.
3) Sum new PD fields.
4) Convert PD back to ZD.
5) Create output record with fewer fields.
My approach has to be execute a statement check the results then add the next statement.
After step 4) the sign is missing.
I get syntax errors for step 5).
Here are the syntax error statements:
WER268A SORT STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Eddie Wilson,
No issues. To preserve the alignment of code and for better readability, you can wrap around your text with Code tags using the "Code" button provided here.
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello Eddie,
If you look at your original post, you will see that your sort control info has been "Code"ed.
The best way to post info from a mainframe screen is to use copy/paste and the Code tag. There is a Preview function that will let you see your post as it will appear to the forum rather than how it appears in the Reply Editor. When copying 3270 data, do not adjust for alignment in the editor. When you have Previewed and are satisfied with the appearance, click Submit - don't forget this step - i've had to re-do because of this )
When you post the requested info, someone will be able to help.
WER268A SORT STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
******************************** BOTTOM OF DATA ********************************
I'm having problems converting to PD and back again.
My input fields are of the format:
TTTTTTTTTTTT.TTTTTTS 12 significant and 6 decimal followed by sign
TTTTTTTTTTTTTTTT.TTS 16 significant and 2 decima follwoed by sign
I want to convert them to PD, sum on these fields and then convert back to the above format.
However, my results are of the format:
TTTTTTTTTTT.TTTTTTBB (where B=blank) 11 significant and 6 decimal followed by 2 blank spaces
TTTTTTTTTTTTTT.TTBB 14 significant and 2 decimal followed by 2 blank spaces.
Can anyone help?
Here are my statements:
Code:
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Display Filter View Print Options Help
-------------------------------------------------------------------------------
SDSF OUTPUT DISPLAY SUDLDU05 JOB09783 DSID 103 LINE 0 COLUMNS 02- 81
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA **********************************
SYNCSORT FOR Z/OS 1.3.1.0R U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSO
STANDARD LIFE FOR ALL OF YOUR LIFE z/OS
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 0EDEA, MODEL 2094 711 LICEN
SYSIN :
SORT FIELDS=(1,4,CH,A, 0003001
5,3,CH,A, 0004001
8,2,CH,A, 0005001
10,1,CH,A, 0006001
11,3,CH,A, 0007001
14,2,CH,A, 0007101
16,5,CH,A, 0007201
21,22,CH,A, 0007301
43,10,CH,A, 0007401
95,10,CH,A, 0007501
53,2,CH,A, 0007601
132,8,CH,A) 0007901
0008000
INREC OVERLAY=(55:55,20,SFF,TO=PD,LENGTH=10,10X, 0012701
75:75,20,SFF,TO=PD,LENGTH=10,10X) 0012801
0012811
SUM FIELDS=(55,10,PD, 0012901
75,10,PD) 0013001
0014001
OUTREC OVERLAY=(55:55,10,PD,EDIT=(TTTTTTTTTTT.TTTTTTS),SIGNS=(,-), 0015002
75:75,10,PD,EDIT=(TTTTTTTTTTTTTT.TTS),SIGNS=(,-)) 0016002
WER108I SORTIN : RECFM=FB ; LRECL= 150; BLKSIZE= 27900
Display Filter View Print Options Help
-------------------------------------------------------------------------------
SDSF OUTPUT DISPLAY SUDLDU05 JOB02153 DSID 103 LINE 0 COLUMNS 02- 81
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA **********************************
SYNCSORT FOR Z/OS 1.3.1.0R U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSO
STANDARD LIFE FOR ALL OF YOUR LIFE z/OS
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 0EDEA, MODEL 2094 711 LICEN
SYSIN :
SORT FIELDS=(1,4,CH,A,
5,3,CH,A,
8,2,CH,A,
10,1,CH,A,
11,3,CH,A,
14,2,CH,A,
16,5,CH,A,
21,22,CH,A,
43,10,CH,A,
95,10,CH,A,
53,2,CH,A,
132,8,CH,A)
SUM FIELDS=(55,20,SFF,
*
75,20,SFF)
WER268A SUM STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
******************************** BOTTOM OF DATA ********************************
I have managed to sort, sum and edit the data as required.
Thanks to everyone for their help.
Here is my solution. If you can suggest a better way that combines the 2 steps into 1 then I would be happy to know.
Code:
****** ***************************** Top of Data ******************************
000001 SORT FIELDS=(1,4,CH,A,
000002 5,3,CH,A,
000003 8,2,CH,A,
000004 10,1,CH,A,
000005 11,3,CH,A,
000006 14,2,CH,A,
000007 16,5,CH,A,
000008 21,22,CH,A,
000009 43,10,CH,A,
000010 95,10,CH,A,
000011 53,2,CH,A,
000012 132,8,CH,A)
000013
000014 INREC OVERLAY=(55:55,20,SFF,TO=PD,LENGTH=10,10X,
000015 75:75,20,SFF,TO=PD,LENGTH=10,10X)
000016
000017 SUM FIELDS=(55,10,75,10),FORMAT=PD
000018
000019 OUTREC OVERLAY=(55:55,10,PD,EDIT=(STTTTTTTTTTTT.TTTTTT),SIGNS=(,-),
000020 75:75,10,PD,EDIT=(STTTTTTTTTTTTTTTT.TT),SIGNS=(,-))
****** **************************** Bottom of Data ****************************
Step 2:
Code:
****** ***************************** Top of Data ******************************
000300 SORT FIELDS=COPY
000800
001500 OUTREC BUILD=(1:1,10,
001600 11:16,39,
001700 50:56,19,
001800 69:55,1,
001900 70:76,19,
002000 89:75,1,
002100 90:95,10)
****** **************************** Bottom of Data ****************************