IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Update a field within a group with a criteria


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
adrianlmk

New User


Joined: 02 Jan 2008
Posts: 11
Location: Malaysia

PostPosted: Tue Aug 12, 2014 9:43 pm
Reply with quote

Hi,

I'm new to use Group= function and searching around and doesn't find the similar example for my reference.

Byte 1 to 9 is the grouping, whenever found a value of 'R' in Byte 11, 'Y' need to be updated into bytes 10 for the same group

Hopefully can get some help from here

My Input is
Code:

12345678901   <--- Column

T20140811NO
T20140811NP
T20140811NR
T20140812NO
T20140812NP
T20140813NR
T20140813NO


My Output expected is

Code:

T20140811YO
T20140811YP
T20140811YR
T20140812NO
T20140812NP
T20140813YR
T20140813YO
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 12, 2014 9:48 pm
Reply with quote

You're probably better off looking a JOINKEYS, with the same DSN for both input files.

In the JNF2CNTL include just the Rs. Then in the Main Task of the JOIN, set Y for those which match.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top