Sort conversion

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
Karthik12
Member
Posts: 8
Joined: Thu Jun 19, 2008 2:51 pm

Sort conversion

Post by Karthik12 » Wed Jul 02, 2008 4:31 pm

I have an ? mark input, i want to replace that one to @
for example
input
?
output
@

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Jul 02, 2008 9:10 pm

I don't know what an " have an ? mark input" is, but if you want to replace a ? with an @ anywhere in your records, you can use a DFSORT job like the following. I assumed your input file has RECFM=FB and LRECL=80, but you can change the job appropriately for other attributes.

Code: Select all

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=..  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  ALTSEQ CODE=(6F7C)
  INREC BUILD=(1,80,TRAN=ALTSEQ)
/*
If that's not what you want to do, then please explain more clearly what it is you want to do.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Tue Jul 29, 2008 4:20 am

You can now do this a bit more easily with DFSORT's new find and replace capability available with z/OS DFSORT V1R5 PTF UK90013. For example:

Code: Select all

    OPTION COPY
    INREC FINDREP=(IN=C'?',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/sof ... /mvs/ugpf/
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others