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

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 1193
Location: Dublin, Ireland

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

Try using ALTSEQ CODE=(6D60)

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

DFSORT Developer


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

PostPosted: Wed Aug 27, 2008 9:43 pm
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:

Use [URL] BBCode for External Links

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top