Is there and efficient way to load Prtf fields with data from a PF?

15 pts.
Tags:
iSeries AS/400
RPG
I want to load a Physical File with Printer File field names and Data. Then read through the PF and populate the printer file field variable with the data from another field in the file. Then I can write the PrtF record with the variable data from the file. For example PFfields: fLINE fCMD1 fRIGHT fDOWN fCMD2 fHEIGHT fWIDTH fCMD3 fDATA fCMD4 Corresponding data: pLine1 ^FO 0025 0050 ^A0N 0180 0065 ^FD Andersen ^FS; pLine2 ^FO 0025 0050 ^A0N 0180 0065 ^FD CUSTOM ORDER ^FS; pLine3 ^FO 0040 0210 ^A0N 0120 0045 ^FD DATALINE3 ^FS. fLINE data: pLine1, pLine2, pLine3 are fields in the PRTF. I tried fLINE = fCMD1+fRIGHT+fDOWN+fCMD2+fHEIGHT+fWIDTH+fCMD3+fDATA+fCMD4; but fLINE get changed from 'pLine1' to ' ^FO00250050'. How do I get the values for fLINE [pLine1] to be taken as literals? I will pass along the answer if I figure it out myself.

Software/Hardware used:
iseries, rpg

Answer Wiki

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

Discuss This Question: 3  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
  • BigKat
    DSPFFD FILE(PRTFNAME) OUTPUT(*OUTFILE) OUTFILE(USRLIB/DATA)
    7,935 pointsBadges:
    report
  • TomLiotta
    How do I get the values for fLINE [pLine1] to be taken as literals?   Practically speaking, you don't. Nor can I think of a good reason for doing so, given the system facilities that are available.   Your question describes a desired technical process and asks how it might be done. There is no good way to do it as you describe. But if you can describe the business process that you are trying to automate, a useful technical method might be available.   You have some input available and a desired output.   I want to load a Physical File with Printer File field names and Data.   Why?   That is, where do the "Printer File field names and Data" come from? How did they get into the PF? (Why were they put there?)   Some background could be very helpful in knowing what's going on. The data looks like it should tell how far across and down a page that data should be positioned. But printer file data field values don't control that. Some alternative needs to be found that goes towards the objective of the business process.   Tom
    125,585 pointsBadges:
    report
  • JimboNbr2
    So I would read through UsrLib/Data, then Chain out to the matching field name in my PF (fLINE = WHFLDI) then populate this field with the data from my PF (fCMD1 fRIGHT fDOWN fCMD2 fHEIGHT fWIDTH fCMD3 fDATA fCMD4), right?  I can see how that should work!  Thanks a bunch!
    15 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