× 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.



I don't think you are understanding my problem.

I can't just turn on *IN33 or use indds, that won't work since I am writing
with the output buffer.
Here is an example:

// write output buffer and read input buffer
Write Maint02 Out02;
Read Maint02 In02;
Eval-Corr Out02 = In02;

I have to move *ON to out02.in33 to make the protect work.
I want to use a named indicator instead of out02.in33 (buffer name).

Craig

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Alan Campin
Sent: Thursday, March 19, 2009 12:55 PM
To: RPG programming on the IBM i / System i
Subject: Re: Indicator name

This is from a document I put into our tips and techniques. Hope it helps.

Using Named Indicators



The last bastion of indicators in RPG is display or print indicators.



You can use p fields to set display attributes but, for example, to display
a subfile or subfile control, you need to use indicators but what the hell
does



*IN27 = *On;



mean in a program?



Wouldn't



DisplaySubfileControl = cTrue;



make more sense?



To do this we use the keyword INDDS on the display file spec.



fTG0002_D01cf e WorkStn InfDS(FI01)
f UsrOpn
f IndDs(dsIndicators)
f Include(RD01_01 :
f SFMSG_CTL)



Next we have a copy block (CB_MAP_IND in ILPGMR/QSRCF) that contains the
following.



d dsIndicators ds

d IndicatorArray...

d Like(StdLgl)

d Dim(99)



Just put /copy *libl/qsrcf,cb_map_ind in your program.



Finally we add a statement after the copy block to do the map.



d DisplaySubfileControl...

d Like(StdLgl)

d Overlay(dsIndicators:27)



We can know refer to the indicators by the name.



DisplaySubfileControl = cTrue;



Or



If DisplaySubfileControl;



Etc.



The complete structure definition. Note that there are no "s" in the field
types which means these just extended the existing data structure.



/copy *libl/qsrcf,CB_MAP_IND

d DisplaySubfileControl...

d Like(StdLgl)

d Overlay(dsIndicators:27)

d DisplaySubfile...

d Like(StdLgl)

d Overlay(dsIndicators:28)

d ClearSubfile...

d Like(StdLgl)

d Overlay(dsIndicators:29)



So now you don't need to use an indicator. You can use a name.


On Thu, Mar 19, 2009 at 10:50 AM, Craig Jacobsen
<CraigJacobsen@xxxxxxxxxxx>wrote:

I'm writing a program (green screen) that uses a write and read
with a data structure name to the workstation.
Actually I'm trying to write this program as a skeleton program for
the rest of the programmers on staff.
I am using Eval-Corr to move data back and forth from input, output,
and disk (using likerec).
Is there a way to rename an indicator in the output buffer?
Right now, I have to Out02.in33 = *On; to protect a screen field on
add (33 protect n33 underline in dds).
I would like to use a named indicator like ProtectStatus.

Any suggestions?

Thanks in advance,

Craig


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


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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.