Go to Next Record via Sort

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

Moderators: Frank Yaeger, Moderator Group

Post Reply
subhazhere
Member
Posts: 2
Joined: Wed Nov 02, 2016 12:55 pm

Go to Next Record via Sort

Post by subhazhere » Wed Nov 02, 2016 1:21 pm

i have a file which is having records as below :

6XXXXXX 101.37 Invalid Pos Type
Device

6XXXXXX 120.87 Invalid Pos Type
Device

i want to write the record as

6XXXXXX 101.37 Invalid Pos Type Device
6XXXXXX 101.37 Invalid Pos Type Device

what is the option to do that. Starting position of Invalid word is 41 and file is of 80 bytes. Device word comes in next line in input file and starting position of the word is same as Invalid (41st).

Please help.

subhazhere
Member
Posts: 2
Joined: Wed Nov 02, 2016 12:55 pm

Post by subhazhere » Mon Nov 07, 2016 11:35 am

Can anyone please help me on my queries? Its urgent!

vikriih
Member
Posts: 6
Joined: Sat Oct 24, 2015 2:28 pm

Post by vikriih » Tue Nov 08, 2016 10:40 am

Device is shown at 1st byte and not 41st byte in the above example. What is actual position 1st or 41st?
What you can do is that you can write a program which reads data from input file and for every two records in the input file it writes only 1 record in the output file. THat way you can move DEVICE word from the second line to the first line next to TYPE. Needless to say that positions need to be specific in the layout file and the file length of 80 should be sufficient to hold the record.

magesh_j
Member
Posts: 16
Joined: Wed Aug 31, 2016 8:32 am

Post by magesh_j » Thu Nov 17, 2016 9:57 pm

You can either use RESIZE ICETOOL or IFTHEN=(WHEN=GROUP,BEGIN=, END= in SORT

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