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
 

 

How to Remove one Header and Tralier using SORT.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to Remove one Header and Tralier using SORT.
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: 2150
Location: At my coffee table

PostPosted: Wed Apr 16, 2008 8:50 pm    Post subject: Re: How to Remove one Header and Tralier using SORT.
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: 1288
Location: Chennai, India

PostPosted: Wed Apr 16, 2008 10:13 pm    Post subject: Reply to: How to Remove one Header and Tralier using SORT.
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 Moderator


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

PostPosted: Wed Apr 16, 2008 11:16 pm    Post subject:
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    Post subject: Reply to: How to Remove one Header and Tralier using SORT.
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    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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


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