|
|
| Author |
Message |
atchuta konduri
New User
Joined: 25 Oct 2007 Posts: 9 Location: mumbai
|
|
|
|
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 |
|
 |
References
|
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 663
|
|
|
|
Hi,
just code it as
| Code: |
ALTSEQ CODE=(2540,0D40)
|
Gerry |
|
| Back to top |
|
 |
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
| Code: |
OPTION COPY
ALTSEQ CODE=(2540,0D40)
OUTREC FIELDS=(1,1000,TRAN=ALTSEQ)
|
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4605 Location: San Jose, CA
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4605 Location: San Jose, CA
|
|
|
|
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 |
|
 |
|
|
|