Page 1 of 1
Overlay using FILEAID.
Posted:
Thu Jul 03, 2014 3:15 pm
by mj025
Hi all,
I am new to here this is my first post in the forum
.
I have input ESDS which is VB file in which certain fields should be masked with spaces........
So, how i can do this using FILE AID or any other utility
let starting position may be 10 and length is 15 of that field that should be masked.....!!
Re: Overlay using FILEAID.
Posted:
Thu Jul 03, 2014 5:45 pm
by Ed Goodman
From my manual:
Replace by Location
The syntax of the REPL parameter when used to unconditionally replace data in a given location is:
REPL=(location,[dupl]new-data)
location : Starting location of the data to replace. Any valid actual or relative location can be used.
dupl : Optional duplication factor that defines the number of times File-AID repeats the new-data, starting at the specified location.
new-data : New data to place in the specified location. Any data format may be entered.
Example 1:
$$DD01 COPY REPL=(4,Cā6ā)
Example 1 copies the input dataset and replaces the data in location 4 of each record
with a character 6.
Re: Overlay using FILEAID.
Posted:
Fri Jul 04, 2014 10:38 am
by mj025
Hi Ed Goodman,
thanx for your reply,i have a idea about the Replace in fileaid but i don't know the correct syntax.
REPL = (4,10C' ')
does the above code will work if i want 10 spaces from 4th position onwards.......?
anyways i will try this.
Re: Overlay using FILEAID.
Posted:
Fri Jul 04, 2014 4:24 pm
by mj025
Hi,
The above code worked for me but if i have to replace more than one fields than how i have to code
like in SORT we code OVERLAY = (1:12C' ' ,23:12C' '...... ) the same with REPL in file aid......?
Re: Overlay using FILEAID.
Posted:
Mon Jul 07, 2014 6:05 pm
by Ed Goodman
Try REPL=(),REPL=(),
Seriously, set up some small test datasets and try things. You'll learn more.
Also, get yourself a copy of the manual, which IS available, no matter what you think.
Re: Overlay using FILEAID.
Posted:
Tue Jul 08, 2014 2:58 pm
by mj025
Hi Ed Godman,
thanx for ur reply,
Ya i tried it earlier before ur post as the same u said using some sample datasets and i got the output as required but i forgotted to reply back here my fault.
thanx for ur concern and time.
Re: Overlay using FILEAID.
Posted:
Tue Jul 08, 2014 5:40 pm
by Ed Goodman
awesome!
Please post your working code for the next poor programmer trying to make it work.
Re: Overlay using FILEAID.
Posted:
Wed Jul 09, 2014 11:15 am
by mj025
Hi,
The code which worked for me is...
$$DD01 COPY IF=(5,EQ,C'A'),
REPL=(5,C'1'),REPL=(6,C'2'),
REPL=(7,C' ') ,REPL=(8,C'2')
Re: Overlay using FILEAID.
Posted:
Thu Jul 10, 2014 6:06 pm
by Ed Goodman
That's good that it worked.
I think, since the fields you showed were contiguous, that you could have used REPL=(5,C'A12 2').
(You actually posted with two replaces going to column 5, so not exactly sure)