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



Craig,
The use of a program-to-system field for indicators is very nice, but unfortunatly, it can not do a Position Cursor or Protect Field.
It can do all of the displayable attributes provided you place the correct hex value into the field.
 
Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3
  
 






________________________________
From: Craig Jacobsen <CraigJacobsen@xxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, March 19, 2009 3:17:35 PM
Subject: RE: Indicator name

Kurt,

I hadn't thought of that, even though I've used this technique before.
Pretty standard in this shop to use indicators in the DDS.
I'll mull it over and talk to the head of Application Development.

Thanks,

Craig

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Kurt Anderson
Sent: Thursday, March 19, 2009 2:46 PM
To: 'RPG programming on the IBM i / System i'
Subject: RE: Indicator name

I haven't done display files in quite some time, but instead of doing a
DSPATR(RI), you can do a DSPATR(&DSPFLD1) where &DSPFLD1 is defined as a
program field in the DDS.  Then in the RPG program you set the DSPFILD1
value with the hex representation of the attribute
http://wiki.midrange.com/index.php/Program_To_System_Fields

In the long run this may be correlated to your issue, but if not, maybe it's
a future consideration for setting the display attribute.

Best of luck,
Kurt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Craig Jacobsen
Sent: Thursday, March 19, 2009 1:27 PM
To: 'RPG programming on the IBM i / System i'
Subject: RE: Indicator name

I thought about doing that.
The big drawback is if a field is added to the screen with an indicator to
reverse image and position cursor.
Makes maintenance a nightmare and if someone goes into SDA brings up the
screen, f4 f6 to sort the buffer may change!
Now the programmer will have to know the buffer positions.
I wanted to make this so any programmer (newbies included) can pick it up
and easily maintain it.
You are suggesting this:
D Out02          ds                  LikeRec(Maint02:*OutPut)
D  ProtectStatus          2      2N

Since this is the entire output buffer, I guess that's the only solution.
I'll stick with out02.in33 = *On in that case. (it's easier to remember
indicators than buffer positions)

Thanks,

Craig                           


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of jdavis@xxxxxxxx
Sent: Thursday, March 19, 2009 1:40 PM
To: RPG programming on the IBM i / System i
Subject: RE: Indicator name

Overlay a name in the DS.

Sonethink like this

D Previous...
D              e Ds                  Qualified ExtName(CF9999P :*INPUT)
D                                    prefix(a)
D Changed_Data          38    568


Jeff Davis
Programmer
Dental Network of America
2 Transam Plaza Drive, Suite 500
Oakbrook Terrace, IL. 60181
630.691.0336




"Craig Jacobsen" <CraigJacobsen@xxxxxxxxxxx> Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
03/19/2009 12:27 PM
Please respond to
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx> cc

Subject
RE: Indicator name






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

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.