View previous topic :: View next topic
Author
Message
ratnakumar New User Joined: 07 May 2009Posts: 30 Location: Banglore
Hi,
I am trying the generate a report using SORT card and am see special characters at position 224 thru 227, and Position 228 thru 233 in SORTOUT.
Can anyone please help me, how to UNPACK the variables in Trailer section:
Provided below the Input file and Sort Card:
Code:
FILE-KEY-TRADE-ID FIKE-KEY-CAN-FLG FILE-ALT-ID FILE-TRD-KEY-TIME(1) FILE-TRD-KEY-DATE(1)
16/AN 1/AN 8/NUM 4/P 5/P
(1-16) (17-17) (18-25) (224-227) (228-232)
3---------------- 4--------------- 6-------------- ----- - - - 36------------------ 37------------------
14497850G 1284952 132705 20150408
14497851G 1284952 151212 20150408
Code:
//SYSIN DD *
JOINKEYS F1=SORTJNF1,FIELDS=(5,16,A)
JOINKEYS F2=SORTJNF2,FIELDS=(5,16,A)
REFORMAT FIELDS=(F1:5,2000,F2:5,400)
SORT FIELDS=COPY
OUTFILE REMOVECC,NODETAIL,VTOF,
BUILD=(2400X),
HEADER1=(001:'TRADID ~',
025:'CAN ~',
790:'ALTID ~',
805:'FMT ~',
820:'TAG1 ~',
840:'TAG2 ~'),
SECTIONS=(1,16,
TRAILER3=(001,016,'~',
017,001,'~',
018,008,'~',
216,004,'~',
224,006,'~', >> Special Characters
228,008,'~', >> Special Characters
2179,027,'~',
2212,027))
/*
Thanks
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
Define the field-type, for instance PD, and use EDIT=.
Back to top
ratnakumar New User Joined: 07 May 2009Posts: 30 Location: Banglore
i tried that, but failed with syntax error.
Code:
224,4,PD,TO=ZD,EDIT=(TTTTTT),'~',
*
228,8,PD,TO=ZD,EDIT=(TTTTTTTTTT),'~',
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
unsure if there is any syntax error.
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
I didn't say you have to attempt conversion and editing at the same time:
Code:
224,4,PD,EDIT=(TTTTTT),'~',
228,8,PD,EDIT=(TTTTTTTTTT),'~',
Back to top
ratnakumar New User Joined: 07 May 2009Posts: 30 Location: Banglore
i tried that too, but gave me syntax error.
Code:
224,4,PD,EDIT=(TTTTTT),'~',
*
228,8,PD,EDIT=(TTTTTTTTTT),'~',
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Am unsure, if can we use the conversion parameters in Trailer section?
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
I'm actually looking at what you are doing now. Firstly, you can't do what you want for an input field. If you want an edited value for a plain field, you need to do it before OUTFIL.
Why are your records so long? Why use VTOF when you don't have V-type records?
Back to top
Please enable JavaScript!