Would this work for you?
A R MYPRTFR
A 3 40'MY PRINTER FILE'
A 54 UNDERLINE
A 32 3 61'Optional Text'
(Note the INDARA keyword.)
Dcl-F TstPrtInd Printer;
Dcl-DS MyRec ExtName('TSTPRTIND':'MYPRTFR':*All);
Dcl-DS IndDataStr Len(99) Based(IndPointer);
Underline Ind Pos(54);
Dcl-S IndPointer Pointer Inz(%Addr(*In));
Underline = *On;
*IN32 = *ON;
Write MyPrtfR MyRec;
*InLR = *On;
(Note that *IN32 can be used as-is. *IN54 or UNDERLINE variable can be
On 02/08/2018 20:48, Charles Wilt wrote:
So for those on midrange-l, you might have saw my post about SCS spool
My "it's not working" ended up being caused by the fact I was using a
LIKEREC() DS to write to the printer file; the indicators used by the
record are included in the LIKEREC() DS.
I had forgotten (maybe never realized) this.
so now I've got
dcl-ds myrec likerec(MYPRTFR);
myrec.IN32 = *ON;
write myprtfr myrec;
Except, I'm not fond of the IN32:)
Is there anyway give that indicator a name?
I realize I could use INDDS() on the f-spec; But this is an existing
program and I'd rather not have to retrofit names onto the other
Declaring a standalone variable based on the %addr(myrec.in32) would be
solution I suppose. But I'd need one for every indicator used. Orperhaps
since the indicators are at the start of the LIKEREC() DS I could justuse
Any other ideas?
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxx for any subscription related
Help support midrange.com by shopping at amazon.com with our affiliate