Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Merge two reports using ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Dingu

New User


Joined: 06 Jul 2007
Posts: 10
Location: Chentrappinni

PostPosted: Thu Jul 19, 2007 4:36 pm    Post subject: Merge two reports using ICETOOL
Reply with quote

Hi all,

I have two files, each with one header, details and one trailer.

File1
----
Hed1
det1
det2
det3
tra1

File2
----
Hed1
det4
det5
det6
tra1

I need to create a sort out file as
Hed1
det1
det2
det3
det4
det5
det6
tra1

First 2 chars of header is X'00' and for trailer is X'FF'.

Thanks is advance
Dingu
Back to top
View user's profile Send private message

Dingu

New User


Joined: 06 Jul 2007
Posts: 10
Location: Chentrappinni

PostPosted: Thu Jul 19, 2007 4:39 pm    Post subject: Re: Merge two reports
Reply with quote

This needs to be done with sort as there are no other utlities like ICETOOL etc.. icon_cry.gif
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Jul 19, 2007 4:41 pm    Post subject:
Reply with quote

Quote:
This needs to be done with sort as there are no other utlities like ICETOOL etc..

Sure?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jul 19, 2007 8:33 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what I think you asked for. I assumed your input files have RECFM=FB and LRECL=80, but you can change the job appropriately for other attributes. I assumed when you said "First 2 chars of header is X'00' and for trailer is X'FF'" you meant "first character" but if it's really X'0000' and X'FFFF', change the job accordingly. I assumed that you don't care which header or trailer we keep - the job actually keeps the header from input file1 and the trailer from input file2.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file1 (FB/80)
//       DD DSN=... input file2 (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1')),
    IFTHEN=(WHEN=(1,1,BI,EQ,X'00'),
      OVERLAY=(81:SEQNUM,1,ZD)),
    IFTHEN=(WHEN=(1,1,BI,EQ,X'FF'),
      OVERLAY=(81:SEQNUM,1,ZD))
  OUTFIL OMIT=((1,1,BI,EQ,X'00',AND,81,1,ZD,EQ,+2),OR,
               (1,1,BI,EQ,X'FF',AND,81,1,ZD,EQ,+1)),
         BUILD=(1,80)
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jul 19, 2007 8:34 pm    Post subject:
Reply with quote

Quote:
This needs to be done with sort as there are no other utlities like ICETOOL etc.


If you have DFSORT, you have DFSORT's ICETOOL.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Produce Mainframe Dash Board Reports ... sdcarlson53 All Other Mainframe Topics 2 Thu Jan 05, 2017 11:01 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts SQL Merge error -254 Robin Sulsona DB2 8 Wed Jun 01, 2016 8:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us