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
 

 

Write OUTFILE by incrementing COUNT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
techslam

New User


Joined: 03 Dec 2010
Posts: 87
Location: India

PostPosted: Thu Sep 11, 2014 3:43 pm    Post subject: Write OUTFILE by incrementing COUNT
Reply with quote

I have two input files :-
1) Master file
Code:

HHH00285YYYYY    <---------- header record
TTT                       <--------- trailer record


2) Count File
Code:

455


I need a sort job that will read both these files as input and then update/create new MASTER file with new count in postion (4,5)
New count must be the count read from COUNT file + 1 ,
ie, in above example , my new MASTER file must be creted as below :
Code:

HHH00456YYYYY    <---------- header record with updated count 455+1=456
TTT                       <--------- trailer record


Thanks for all the help provided.
Back to top
View user's profile Send private message

techslam

New User


Joined: 03 Dec 2010
Posts: 87
Location: India

PostPosted: Fri Sep 12, 2014 11:49 am    Post subject: Is this not achievable through DFSORT ?
Reply with quote

Is this not achievable through DFSORT ?
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Sep 12, 2014 2:27 pm    Post subject:
Reply with quote

Ok but did you try something ?

I am pretty sure this forum has few examples

Based on the input you have provided

1.I assume your master file has two records and count file has 1 record
2.I would suggest a 2 step approach , 1 with SYMNAMES and the next with a basic sort with OVERLAY
Back to top
View user's profile Send private message
Gabriel Araujo Alves

New User


Joined: 20 Jul 2010
Posts: 38
Location: Brazil

PostPosted: Fri Sep 12, 2014 8:41 pm    Post subject:
Reply with quote

If you have a field in common in both files , you might use JoinKeys.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Sat Sep 13, 2014 3:17 pm    Post subject: Reply to: Write OUTFILE by incrementing COUNT
Reply with quote

JOINKEYS will work, whether or not there is a match existing in the data (one can always be made with JNFnCNTL).

However, Pandora's suggestion is much more efficient and would be the recommended way to do it. Examples here.
Back to top
View user's profile Send private message
techslam

New User


Joined: 03 Dec 2010
Posts: 87
Location: India

PostPosted: Sun Sep 14, 2014 2:10 am    Post subject:
Reply with quote

Thank you everyone.
below link helped me getting this requirement done.

http://ibmmainframes.com/about35147.html
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 abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Update the Sortout file with record c... karthik_sripal SYNCSORT 8 Tue May 17, 2016 8:52 pm


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