Changing logical pfile via program

320 pts.
Tags:
AS/400
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?
ASKED: January 6, 2006  3:15 PM
UPDATED: January 9, 2006  2:25 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Ricksmith
    Would using OPNQRYF be an alternative?
    0 pointsBadges:
    report
  • TheQuigs
    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 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following