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
 

 

SORT to change all '_' in a dataset to '-'.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Sonal Jadhao

New User


Joined: 03 Apr 2008
Posts: 5
Location: Chennai

PostPosted: Wed Aug 27, 2008 1:14 pm    Post subject: SORT to change all '_' in a dataset to '-'.
Reply with quote

Hi all

I wanted to change all '_' in a dataset to '-'. Its working using FILEAID. But I want to do it using SORT , CHANGE, but as the dataset is a variable block(Max record length-32752) , its not working. The sortcard i m using now is
Code:

  SORT FIELDS=COPY                     
  INREC FIELDS=(5:5,3,8:8,1,9:9,32739) 
  OUTREC FIELDS=(5,3,8,1,               
          CHANGE=(8,C'_',C'-'),       
                   NOMATCH=(8,8),     
                       9,32739)       


and error msg is
RECORD TYPE IS V - DATA STARTS IN POSITION 5
INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
C5-K26318 C6-K90007 C7-K90000 C8-K23476 E7-K24705
END OF DFSORT
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Aug 27, 2008 2:41 pm    Post subject:
Reply with quote

Try using ALTSEQ CODE=(6D60)

Regards,
Garry.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Aug 27, 2008 9:43 pm    Post subject:
Reply with quote

You can now do this kind of thing quite easily with the new FINDREP function of DFSORT's ICETOOL available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:

//S1   EXEC  PGM=ICEMAN
//SYSOUT   DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (VB)
//SYSIN DD *
   OPTION COPY
   ALTSEQ CODE=(6D60)                 
   INREC FINDREP=(IN=C'_',OUT=C'-'))   
/*


For complete details on the new FINDREP function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/

If you don't have PTF UK90013, ask your System Programmer to install it (it's free).

Alternatively, you can use a DFSORT job like this:

Code:

//S1   EXEC  PGM=ICEMAN
//SYSOUT   DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (VB)
//SYSIN DD *
   OPTION COPY
   ALTSEQ CODE=(6D60)                 
   INREC BUILD=(1,4,5,TRAN=ALTSEQ)   
/*


Note that the reason you received

INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND

for your job is that didn't specify the RDW (1,4) as the first field in the INREC and OUTREC statements - it's required for VB files.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


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