Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Special Characters in Sort - Trailer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
ratnakumar

New User


Joined: 07 May 2009
Posts: 30
Location: Banglore

PostPosted: Mon May 11, 2015 5:57 pm    Post subject: Special Characters in Sort - Trailer
Reply with quote

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
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon May 11, 2015 6:13 pm    Post subject: Reply to: Special Characters in Sort - Trailer
Reply with quote

Define the field-type, for instance PD, and use EDIT=.
Back to top
View user's profile Send private message
ratnakumar

New User


Joined: 07 May 2009
Posts: 30
Location: Banglore

PostPosted: Mon May 11, 2015 7:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon May 11, 2015 7:25 pm    Post subject: Reply to: Special Characters in Sort - Trailer
Reply with quote

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
View user's profile Send private message
ratnakumar

New User


Joined: 07 May 2009
Posts: 30
Location: Banglore

PostPosted: Tue May 12, 2015 10:23 am    Post subject: Reply to: Special Characters in Sort - Trailer
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue May 12, 2015 11:41 am    Post subject: Reply to: Special Characters in Sort - Trailer
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us