Is there anyway I can open an RPG source file using an RPG ILE program and read the source code line by line so I can edit it then save the source file? If I cannot edit the source file using RPG ILE what would I be able to use?
Announcement
Collapse
No announcement yet.
RPGLE program that edits rpg source code
Collapse
X
-
Re: RPGLE program that edits rpg source code
Originally posted by gtankIs there anyway I can open an RPG source file using an RPG ILE program and read the source code line by line so I can edit it then save the source file? If I cannot edit the source file using RPG ILE what would I be able to use?"Time passes, but sometimes it beats the <crap> out of you as it goes."
-
Re: RPGLE program that edits rpg source code
source files are basically a multiple member phsical file that has three fields...
srcdta (the large field) srcdat(the date on the far right in pdm) and srcseq (the sequence number on the left)
so that said....
just place QRPGSRC up in your F specs with a rename of the format of course and a usropn use ovrdbf (qcmdexc) to override to the member you want to read.
Then just read and process.
kinda simple explanation I know
but here is an example that writes to a source member just reverse the logic...
Welcome to code400 happy holidays
JamieAll my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: RPGLE program that edits rpg source code
Ill drop it out there for you -- it wont be perfect cause the header & footer have changed.
Its on my list of things never to complete
this be OLD non free code...
should be there now
jamieAll my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
Comment