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

add a value from 02 type records to 01 type record


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

New User


Joined: 13 May 2008
Posts: 4
Location: pune

PostPosted: Fri May 08, 2009 7:09 pm
Reply with quote

Hi All,

I want to add a value from 02 type records to 01 type record using ICETOOL... any help

I/P file:

01AC AAAC00001000060 10080000.0085 - 01 type record
02AC AAAC00001000060 05040000.0085 - 02 type record
01AC AAAC00001000022 10080000.0085
02AC AAAC00001000022 05040000.0085

expected O/P file(only 01 type record):

01AC AAAC00001000060 15120000.0085
01AC AAAC00001000022 15120000.0085

Advance thanks for your advise...........
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 08, 2009 7:31 pm
Reply with quote

What is LRECL and RECFM?
will there be one 01 record followed by one 02 record always?
Back to top
View user's profile Send private message
pankajauti

New User


Joined: 13 May 2008
Posts: 4
Location: pune

PostPosted: Fri May 08, 2009 7:35 pm
Reply with quote

What is LRECL and RECFM?
LRECL = 120 and RECFM=FB
will there be on 01 record followed by one 02 record always?
Yes
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 08, 2009 8:49 pm
Reply with quote

pankajauti,

Isn't it a simple case of summing on the key?


Code:

//STEP0100 EXEC PGM=SORT           
//SYSOUT   DD SYSOUT=*             
//SORTIN   DD *
----+----1----+----2----+----3----+
01AC AAAC00001000060 10080000.0085 
02AC AAAC00001000060 05040000.0085 
01AC AAAC00001000022 10080000.0085 
02AC AAAC00001000022 05040000.0085 
//SORTOUT  DD SYSOUT=*             
//SYSIN    DD *                     
  SORT FIELDS=(6,15,CH,A),EQUALS   
  SUM FIELDS=(22,8,ZD)             
/*
Back to top
View user's profile Send private message
pankajauti

New User


Joined: 13 May 2008
Posts: 4
Location: pune

PostPosted: Mon May 11, 2009 11:07 am
Reply with quote

Thanks ... :-) It's working ...
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top