View previous topic :: View next topic
Author
Message
atchuta konduri New User Joined: 25 Oct 2007Posts: 16 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
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
just code it as
Code:
ALTSEQ CODE=(2540,0D40)
Gerry
Back to top
Vasukip Currently Banned New User Joined: 17 Jun 2008Posts: 48 Location: Chennai
Code:
OPTION COPY
ALTSEQ CODE=(2540,0D40)
OUTREC FIELDS=(1,1000,TRAN=ALTSEQ)
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
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:
Use [URL] BBCode for External Links
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 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:
Use [URL] BBCode for External Links
Back to top
Please enable JavaScript!