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

UPDATE first n records only in place


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Melvyn Jacobs

New User


Joined: 05 Nov 2010
Posts: 7
Location: Australia

PostPosted: Fri Aug 10, 2012 8:39 am
Reply with quote

Hi

I want to use FileAid to change ONLY the 1st 3 records in a file on specified criteria, e.g. if I have

// a1-b2-c3
// z1-x1-b2-a1
// b2-a1
// xxxxxxxxxxxxxxxx-b2-a1

I want to change a1 to a9 & b2 to b9 anywhere on the JUST the first 3 lines, so I get

// a9-b9-c3
// z1-x1-b9-a9
// b9-a9
// xxxxxxxxxxxxxxxx-b2-a1

thx

MJ
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 10, 2012 11:13 am
Reply with quote

At the moment - I don't have File-Aid available to me, however, try this (untested):
Code:
//SYSIN DD *
$$DD01 UPDATE EA=(1,0,T"a1",C"a9"),
              EA=(1,0,T"b2",C"b9"),OUT=3
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 10, 2012 11:15 am
Reply with quote

OTOH, if you can use SORT (SyncSort or DFSort) -- FINDREP can be very handy for the question in this thread of yours.
Back to top
View user's profile Send private message
Melvyn Jacobs

New User


Joined: 05 Nov 2010
Posts: 7
Location: Australia

PostPosted: Wed Aug 15, 2012 8:36 am
Reply with quote

I did it in 2 steps, with a combination of OUT to change the 1st 3 records to 1 file, and DROP to drop the 1st 3 and copy the rest to another, and then recombined

Thx

MJ
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Aug 15, 2012 2:51 pm
Reply with quote

That's another way of doing this.

Thanks for the follow up, glad you got it working! icon_smile.gif
Back to top
View user's profile Send private message
robert, galambos

New User


Joined: 24 Aug 2012
Posts: 5
Location: canada

PostPosted: Mon Aug 27, 2012 1:47 am
Reply with quote

this can be done by using the options panel within selection criteria and specifying the number of records you want to select.

you achieve the same results in both online or batch
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 -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top