Query in dfsort / icetool

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
User avatar
Krishna
Site Admin
Posts: 1052
Joined: Fri Jan 27, 2006 7:50 am

Query in dfsort / icetool

Post by Krishna » Wed Sep 20, 2006 11:40 am

Following question asked in MVSQUEST and answered by Frank Yaeger


Query
------

I need to change the footer record of input file incremented by .01
(if the input file contains footer record FOOTER0000001. 01 the output file
should contain footer record FOOTER0000001. 02) and (if the input file
contains footer record FOOTER0000001. 99 the output file should contain
footer record FOOTER0000002. 00.

Could anyone help me how to solve using dfsort/icetool.
INPUT FILE:

Code: Select all

   HEADER09192006
   AAAAAA111111
   BBBBBB222222
   CCCCCC333333
   DDDDDD444444
   EEEEEE555555
   FOOTER0000001.01
OUTPUT FILE:

Code: Select all

 HEADER09192006
 AAAAAA111111
 BBBBBB222222
 CCCCCC333333
 DDDDDD444444
 EEEEEE555555
 FOOTER0000001.02

Frank Yaeger Answer :
Here's a DFSORT job that will do what you asked for:

Code: Select all

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
  OPTION COPY
  INREC IFTHEN=(WHEN= (1,6,CH,EQ, C'FOOTER' ),
    OVERLAY=(7:7, 10,UFF,ADD, +1,EDIT=( TTTTTTT.TT) ))
_/*

Thanks
Krishna

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 Sep 20, 2006 9:07 pm

Krishna,

I answer numerous DFSORT/ICETOOL questions on other help boards every day (this is the least active board I participate in). I'm curious - why did you chose this one question and response to post here?
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
Krishna
Site Admin
Posts: 1052
Joined: Fri Jan 27, 2006 7:50 am

Post by Krishna » Thu Sep 21, 2006 12:25 pm

Frank,

When i have seen this question, I thought it will be useful for IMG board users & posted the same here.


Thanks,
Krishna

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