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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

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