View previous topic :: View next topic
|
Author |
Message |
Melvyn Jacobs
New User
Joined: 05 Nov 2010 Posts: 7 Location: Australia
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Melvyn Jacobs
New User
Joined: 05 Nov 2010 Posts: 7 Location: Australia
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
That's another way of doing this.
Thanks for the follow up, glad you got it working! |
|
Back to top |
|
|
robert, galambos
New User
Joined: 24 Aug 2012 Posts: 5 Location: canada
|
|
|
|
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 |
|
|
|