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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Setting Font Type for XMIT satish.ms10 All Other Mainframe Topics 3 Fri Sep 15, 2017 10:01 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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