Copy file using DFSORT based on a value

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

Moderators: Frank Yaeger, Moderator Group

Post Reply
nkulkarni
Member
Posts: 2
Joined: Tue Sep 29, 2015 1:30 pm

Copy file using DFSORT based on a value

Post by nkulkarni » Tue Sep 29, 2015 1:35 pm

Hi,

I have an input file which contains lot of data (80 bytes length) about the return code information of steps of a batch job.

Number of records in input file vary depending on the number of steps in every batch job, a string "BAD RC" is placed in the file in any random position if any of the step in the job has produced an unacceptable return code.

My requirement is to read and copy the content of the input file only if at least one "BAD RC" string is found anywhere in the file ELSE a string "DUMMY" needs to be written to output.

If Input is as below

A
AB
ABC BAD RC
ABCD
ABCDEF

then output should be the same

A
AB
ABC BAD RC
ABCD
ABCDEF

If input is as below

A
AB
ABC
ABCD
ABCDEF

then the output should be

DUMMY

Could anyone please inform me if this can be done using DFSORT and if so then how?
NK

academyindia4

Topic deleted by Admin

Post by academyindia4 » Fri Jan 15, 2016 8:25 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