SORTD OUTREC Reformatting Query

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
pbouzaid
Member
Posts: 5
Joined: Mon Jul 03, 2006 6:09 am

SORTD OUTREC Reformatting Query

Post by pbouzaid » Mon Jul 03, 2006 6:14 am

I am wondering how I can perform the following formatting in my SORTD OUTREC string:

My input data is the following (HEX),

50501304
62140008


I want to expand this hex data in the output file to be in the following representation,

5602510410300048

Is such a re-format possible?

Pete.

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

Post by Frank Yaeger » Mon Jul 03, 2006 8:32 pm

The following DFSORT job will do what I think you asked for:

Code: Select all

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTREC FIELDS=(1,8,HEX)
/*
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/sof ... tmpub.html
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

pbouzaid
Member
Posts: 5
Joined: Mon Jul 03, 2006 6:09 am

Post by pbouzaid » Tue Jul 04, 2006 5:11 am

Thanks for the info and references. That worked a treat!

Cheers,

Pete.

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Feb 01, 2016 11:00 pm

<< Content deleted By Admin >>

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