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



There is one drawback to the INDDS option - it means that the device indicators are completely separate from the *IN indicators which can make life messy if (for example) one is still using O-specs. An alternative solution is to simply to remap the existing indicator bank.

Like so:

D DspInd DS Based(pIndicators)
// Response indicators
D Exit_03 N Overlay(DspInd: 3)
D Return_12 N Overlay(DspInd: 12)

// Conditioning indicators
D Error_31 N Overlay(DspInd: 31)
D StDtErr_32 N Overlay(DspInd: 32)
D EndDtErr_33 N Overlay(DspInd: 33)

D pIndicators S * Inz(%Addr(*In))

Note that I don't like From/To notation - but it could have been used here.

Same example in modern RPG <grin>.

dcl-ds DspInd Based(pIndicators);
// Response indicators
Exit_03 Ind Pos(3);
Return_12 Ind Pos(12);
// Conditioning indicators
Error_31 Ind Pos(31);
StDateError_32 Ind Pos(32);
EndDateError_33 Ind Pos(33);
end-ds;

dcl-s pIndicators Pointer Inz(%Addr(*In));

Yet another option - and one that I sometimes use when retrofitting an existing program - is to use a named constant together with *IN(xx) notation.

So given a constant named StDateError_32 with a value 32 I could have done:

*In(StDateError_32) = *On;

etc.

In all these examples note that the actual indicator number is utilized in the name. This helps defuse the dinosaur brigade who will otherwise dis the code because it is "too hard to work out what actual indicator number is used". Which has a ring of truth to it - but is rarely why they are really bitching - they just don't like anything they can't code in RPG III.

(And yes I am in a cranky mood today 3 days without enough sleep will do that to you).


On 2014-09-08, at 12:47 PM, Mohan Eashver <mohankva@xxxxxxxxx> wrote:

Thank you both Doug & Michael.
Appreciate your help.


----
Regards,
Mohan Eashver


On Mon, Sep 8, 2014 at 12:37 PM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:

Use an Indication Data Structure (INDDS)

FWCS110D CF E WorkStn IndDS(WCS110DS)
F SFile(WCS110D1:D1RRN)

* Workstation indicator data structure.
D WCS110DS DS
D Exit 3 3N
D SortByName 5 5N
D SortByAcct 6 6N
D SortByDate 7 7N
D NameSearch 17 17N
D AcctSearch 18 18N
D DateSearch 19 19N
D Previous 12 12N
D SflDsp 30 30N
D SflDspCtl 31 31N
D SflClr 32 32N
D RollUp 40 40N
D RollDown 41 41N

And in the DDS:

A INDARA

On Mon, Sep 8, 2014 at 12:07 PM, Mohan Eashver <mohankva@xxxxxxxxx> wrote:

Hi All,

I have an indicator 50 that is used within the DSPF.
I like to refer to that as an RPG variable OK2SCAN.

I believe there is a way to do that. Not sure how.

----
Regards,
Mohan Eashver
--
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: 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 (AS/400 and iSeries) (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 (AS/400 and iSeries) (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.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com





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.