Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
atchuta konduri

New User


Joined: 25 Oct 2007
Posts: 5
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
References
PostPosted: Tue Jul 22, 2008 2:25 pm    Post subject: Re: How to remove special characters(X'0D' and X'25')? Reply with quote

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 456

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

New User


Joined: 17 Jun 2008
Posts: 41
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: 4228
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: 4228
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1