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



In a similar system I created a separate data structure to just contain the error indicators.


Dcl-ds Indicators Qualified Based( IndicatorPtr ) ;
sf1_clear IND POS(80);
sf1_#records IND Pos(81);
sf1_SflEnd ind pos(88);
ws1_clear ind Pos(90);
s2_descriptionError Ind Pos(50):
s2_error2 Ind Pos(55):
s2_error3 Ind Pos(58):
...
All ind dim(99) pos(1);
END-DS;

// this ds does not contain positions and just maps specific fields by name.
Dcl-Ds ErrorOnly Qualfiied;
s2_descriptionError Ind;
s2_error2 Ind;
s2_error3 Ind:
End-Ds;

Clear ErrorOnly;
// By naming the fields, you can use EVAL-CORR to set them off.
Eval-Corr Indicators = ErrorOnly;


By using the names to link the two data structures I no longer need to worry about assigning the indicators sequentially.


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jay Vaughn
Sent: Thursday, July 11, 2019 10:21 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: screen to rpg indicator pointer

i have the below code in my pgm...

d IndicatorPtr s * Inz(%Addr(*In))
d Indicators ds Based(IndicatorPtr)
d sf1_clear 1n Overlay(Indicators:80)
d sf1_#records 1n Overlay(Indicators:81)
d sf1_SflEnd 1n Overlay(Indicators:88)
d ws1_clear 1n Overlay(Indicators:90)
d ws1_#records 1n Overlay(Indicators:91)
d ws1_SflEnd 1n Overlay(Indicators:98)
d s2_error...
d n
d s2_Inquiry_Protect...
d 1n Overlay(Indicators:35)
d s2_protectOnEdit...
d 1n Overlay(Indicators:36)
d s3_error...
d n
d n

d IndicatorPtr2 s * Inz(%Addr(*In))
d ds_s2Errors ds Based(IndicatorPtr2)
d s2_descriptionError...
d 1n Overlay(ds_s2Errors:51)
d s2_investorsError...
d 1n Overlay(ds_s2Errors:52)
d s2_statesError...
d 1n Overlay(ds_s2Errors:53)


I am wanting to simply set off all error indicators by doing...

clear ds_s2Errors

this works but it clears ALL indicators in the %Addr(*In)) pointer...

How can I set a range of indicators off (or accomplish what I'm trying to do)... in this scenario?
Hoping for a low impact change to %addr(*In) where I can specify an indicator range.

tia

jay

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.