IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Special Characters in Sort - Trailer


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Mon May 11, 2015 6:13 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Mon May 11, 2015 7:25 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Tue May 12, 2015 11:41 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Date conversion using SORT SYNCSORT 4
No new posts Which SORT utility can improve the Pe... DFSORT/ICETOOL 16
No new posts Using sort on VB records based on off... DFSORT/ICETOOL 6
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts Copying data from prev record using SORT SYNCSORT 19
Search our Forums:

Back to Top