× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a working example, Charles. Try it out..

The DDS INDARA keyword  does _not_ require INDDS on the F-spec. (The reverse is true.) INDARA simply dictates that the Indicator variables (*IN01-99) are arranged in a separate area to the record format buffer. (From the DDS Ref, "You use this file-level keyword to remove option indicators from the buffer (also called the record area) and to place them in a 99-byte separate indicator area.")

So, this avoids the problem of having indicators mixed in with the other definitions in the MYREC data structure. Also, because INDDS is not used, there is no renaming of indicators to interfere with existing code.

Hope this helps.

Brian.

On 03/08/2018 14:12, Charles Wilt wrote:
Brian,

I mention in the original post that INDDS() wasn't an option....which BTW
you're missing on your f-spec to make INDARA work.

Charles


On Fri, Aug 3, 2018 at 5:25 AM Brian Parkins <goodprophet.bp@xxxxxxxxx>
wrote:

Would this work for you?

INDARA
A R MYPRTFR
A 3 40'MY PRINTER FILE'
A 54 UNDERLINE
A 32 3 61'Optional Text'

(Note the INDARA keyword.)

**Free
Dcl-F TstPrtInd Printer;

Dcl-DS MyRec ExtName('TSTPRTIND':'MYPRTFR':*All);
End-DS;

Dcl-DS IndDataStr Len(99) Based(IndPointer);
Underline Ind Pos(54);
End-DS;

Dcl-S IndPointer Pointer Inz(%Addr(*In));

Underline = *On;
*IN32 = *ON;
Write MyPrtfR MyRec;
*InLR = *On;
Return;

(Note that *IN32 can be used as-is. *IN54 or UNDERLINE variable can be
used interchangeably.)

Brian.

On 02/08/2018 20:48, Charles Wilt wrote:
OK,

So for those on midrange-l, you might have saw my post about SCS spool
files.

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
indicators
right now.

Declaring a standalone variable based on the %addr(myrec.in32) would be
one
solution I suppose. But I'd need one for every indicator used. Or
perhaps
since the indicators are at the start of the LIKEREC() DS I could just
use
it's address...

Any other ideas?

Thanks!
Charles
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.