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
 
UPDATE first n records only in place

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: UPDATE first n records only in place
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

Senior Member


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

PostPosted: Fri Aug 10, 2012 11:13 am    Post subject:
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

Senior Member


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

PostPosted: Fri Aug 10, 2012 11:15 am    Post subject:
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    Post subject: fixed
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

Senior Member


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

PostPosted: Wed Aug 15, 2012 2:51 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 2 Sat Feb 17, 2018 4:20 pm
No new posts Need Guidance regarding UPDATE query Poha Eater DB2 2 Mon Feb 12, 2018 11:35 pm
No new posts Need all records with high key kalidasvs SYNCSORT 13 Fri Feb 09, 2018 10:38 pm
No new posts Why is SORT rearranging records that ... cschablow DFSORT/ICETOOL 4 Wed Jan 24, 2018 10:14 pm
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm

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