Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 08 May 2006
Posts: 1002
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 Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us