Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us