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
 

 

How to remove special characters(X'0D' and X'25')?

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

New User


Joined: 25 Oct 2007
Posts: 16
Location: mumbai

PostPosted: Tue Jul 22, 2008 2:25 pm    Post subject: How to remove special characters(X'0D' and X'25')?
Reply with quote

Hi,

I have an input file of LRECL=1000,RECFM= FB
It contains special characters/carriage return characters like X'0D' and X'25'

They can appear anywhere in the file.I need to replace these charactes with spaces.

I tried with this jcl and it worked but in two passes

Code:

//STEP1   EXEC  PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DSN=filea.input  --> File containing special characters
//            DISP=SHR                                     
//SORTOUT  DD DSN=fileb.output,             
//            DISP=(NEW,CATLG,DELETE),                     
//            UNIT=SYSDA,                                   
//            SPACE=(CYL,(50,50),RLSE)                     
//SYSIN DD *                                               
  OPTION COPY                                               
  ALTSEQ CODE=(2540)                                       
  OUTREC FIELDS=(1,1000,TRAN=ALTSEQ)                       
/*                                                         
//*                                                         
//STEP2   EXEC  PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DSN=fileb.output,
//            DISP=SHR                                     
//SORTOUT  DD DSN=filec.output,
//            DISP=(NEW,CATLG,DELETE),                     
//            UNIT=SYSDA,                                   
//            SPACE=(CYL,(50,50),RLSE)                     
//SYSIN DD *                                               
  OPTION COPY                                               
  ALTSEQ CODE=(0D40)                                       
  OUTREC FIELDS=(1,1000,TRAN=ALTSEQ)                       
/*                                                         
//*


Is it possible to remove the special characters(X'0D' and X'25') in one single pass?
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jul 22, 2008 3:33 pm    Post subject:
Reply with quote

Hi,

just code it as

Code:

   ALTSEQ CODE=(2540,0D40)


Gerry
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Tue Jul 22, 2008 3:37 pm    Post subject: Re: How to remove special characters(X'0D' and X'25')?
Reply with quote

Code:

  OPTION COPY                                               
  ALTSEQ CODE=(2540,0D40)                                       
  OUTREC FIELDS=(1,1000,TRAN=ALTSEQ)     
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: Tue Jul 22, 2008 9:45 pm    Post subject:
Reply with quote

atchuta konduri,

Since you knew you could use the ALTSEQ statement to set up one pair of characters, I'm surprised you didn't just look up the ALTSEQ statement in the DFSORT books to see if it could do more. The DFSORT books are all available online at:

www.ibm.com/systems/support/storage/software/sort/mvs/srtmpub.html
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: Tue Jul 29, 2008 4:23 am    Post subject:
Reply with quote

With z/OS DFSORT V1R5 PTF UK90013 (July, 2008), you can now use DFSORT's new FINDREP function to do this kind of thing a bit more easily. For example:

Code:

  OPTION COPY                                               
  INREC FINDREP=(IN=(X'25',X'0D'),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/
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 Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts Check special resource availability w... pinimo JCL & VSAM 8 Fri Apr 15, 2016 8:18 pm
No new posts Trasnmitting a file with french chara... spoorni IBM Tools 1 Wed Feb 24, 2016 8:13 pm
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm
No new posts Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm


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