320 pts.
 Changing logical pfile via program
I need to change the pfile in the source of a logical file member so I can then compile it on the fly via a clp. How do I accomplish this?

Software/Hardware used:
ASKED: January 6, 2006  3:15 PM
UPDATED: January 9, 2006  2:25 PM

Answer Wiki:
Hi, You can read and write the source file where you defined the LF like a normal file, either natively or through SQL. Do a DSPFFD of the source PF to get the column definitions. To change the pfile in the source of the LF read the source until you find 'PFILE(' in column 45 of the source. Change it to whatever you want, close the file and compile it on the fly. Good luck. JohnDavid
Last Wiki Answer Submitted:  January 9, 2006  4:43 am  by  JohnDavid   5 pts.
All Answer Wiki Contributors:  JohnDavid   5 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Would using OPNQRYF be an alternative?

 0 pts.

 

Would it work to use the ADDLFM command and specify the physical file and member on the DTAMBRS parameter?

I’ve never done what you’re after, but this seems like a simple approach to me.

 0 pts.