Hi All,
I need to insert a line(Say: "New Message here") after specific line (Say: "After this line") in a PS File(Say: "APP.D1111.FILE") using REXX
For Eg:
Contents of APP.D1111.FILE
First Line
After this line
Second Line
Third Line
After this line
Fourth Line
Output Needed:
First Line
After this line
New Message here
Second Line
Third Line
After this line
New Message here
Fourth Line
Thanks for help in Advance
~Anshul
"execio * diskr ddname (finis)" /* stack the dataset contents */
qn=queued()
do qn /* process stacked data */
parse pull r
queue r
if pos('whatever you are looking for',r)>0 then queue ' inserted data'
end
"execio" queued() "diskw ddname (finis)" /* rewrite dataset */