The following example shows how you can use the DSEB (Data Set Edit Batch) function to edit a
data set from a batch job (this example performs the editing “on itself”):
⋮
$$FILEM DSEB DSNIN=FMNUSER.JCL(AAADSU4),
$$FILEM PROC=*
bot() /* Go to the last record */
rc = findprev('/+') /* Find the input sentinel */
If rc ¬= 0 then do /* We found it ok */
say 'We found it at' rc
up(1) /* backup a record */
outrec = change(inrec,'fred','john') /* change fred to john */
say 'inp-'inrec
say 'out-'outrec
update() /* and do the update */
end
rc = findprev('sentinel',40)
If rc ¬= 0 then do
outrec = change(inrec,'sentinel','marker ')
update()
end
/* this is a comment with fred in it */
/+
⋮
Have feedback? Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.