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
 

 

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 IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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