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: 992
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm


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