IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Remove one Header and Tralier using SORT.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mramesh

New User


Joined: 19 Feb 2005
Posts: 6

PostPosted: Wed Apr 16, 2008 5:47 pm
Reply with quote

My requirement is:
Input File 1:
HD20-12-2007
ddaaaaa
ddbbbbb
ddcccccc
ddddddd
TL00006

Input File 2:
HD21-12-2007
dd11111
dd22222
dd33333
dd44444
dd55555
TL00007

My output file should be:
HD20-12-2007
ddaaaaa
ddbbbbb
ddcccccc
ddddddd
dd11111
dd22222
dd33333
dd44444
dd55555
TL00010

Can we do this using DFsort(because our project is not using ICETOOL.)
Please let me know if any other information is needed.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Apr 16, 2008 8:50 pm
Reply with quote

mramesh wrote:
Can we do this using DFsort(because our project is not using ICETOOL.)
I can't resist......One in the same, more or less...
Just why is your project not using ICETOOL if it might be the better tool for the job?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Apr 16, 2008 10:13 pm
Reply with quote

ramesh,

Quote:
Can we do this using DFsort(because our project is not using ICETOOL.)


ICETOOL is shipped along with DFSORT. If you have DFSORT installed in your site then you can use ICETOOL.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Apr 16, 2008 11:16 pm
Reply with quote

ramesh,

Assuming you want a count of 11 rather than 10 to be consistent with your input counts, here's a DFSORT job that will do what you asked for. I assumed your input files have RECFM=FB and LRECL=80, but you can change the job as appropriate for other attributes:

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
  OMIT COND=(1,2,CH,EQ,C'TL')
  INREC IFTHEN=(WHEN=(1,2,CH,EQ,C'HD'),OVERLAY=(81:SEQNUM,1,ZD))
  OUTFIL REMOVECC,OMIT=(81,1,CH,EQ,C'2'),
    BUILD=(1,80),
    TRAILER1=('TL',COUNT+1=(M11,LENGTH=5))
/*


If you really want a count of 10 rather than 11, change COUNT+1= to COUNT=.
Back to top
View user's profile Send private message
mramesh

New User


Joined: 19 Feb 2005
Posts: 6

PostPosted: Thu Apr 17, 2008 11:09 am
Reply with quote

Thank you for response...
i am really very happy.... icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top