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
 

 

add a value from 02 type records to 01 type record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: add a value from 02 type records to 01 type record
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    Post subject:
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    Post subject: Reply to: add a value from 02 type records to 01 type record
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    Post subject: Reply to: add a value from 02 type records to 01 type record
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    Post subject: Reply to: add a value from 02 type records to 01 type record
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    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 Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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