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
ASKED:
November 29, 2012 5:14 PM
UPDATED:
November 29, 2012 6:05 PM
DSPFFD FILE(PRTFNAME) OUTPUT(*OUTFILE) OUTFILE(USRLIB/DATA)
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
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!