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
 
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: 1542
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: 7314

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
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

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