how can we use ponter in function keys?

85 pts.
Tags:
iSeries development
RPGLE
usually we are using if *in03=*off like that instead of this i want to give directly IF EXIT like that I think some pointers are used to this i am not sure about that please replay me this question.

Answer Wiki

Thanks. We'll let you know when a new response is added.

In order to assign Function Keys F1-F24 to Names/Pointers use the INDARA in the Dispaly File see the example here:
<pre>http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakc/rzakcmstdfindar.htm</pre>

Then use the INDDS keyword in your RPG program <pre>http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzakc/rzakcmstdfindar.htm</pre>
<pre>
FZZDR917D CF E WORKSTN
F INDDS(SRIND) </pre>

Define the datastructure in the RPG program:
<pre>
D SRIND DS
D*
D* — Display File Command Key Indi
D EXIT 3 3N
D PROMPT 4 4N
D DELETE 11 11N
D CANCEL 12 12N </pre>

Then use the names in your in the RPG program:
<pre>
DOU EXIT = *ON;
|
ENDDO;
or
IF PROMPT = *ON;
or
IF DELETE = *ON;
or
IF EXIT = *ON OR CANCEL = *ON;
EVAL EXIT = *ON;
LEAVESR;
ENDIF;
</pre>

——————————————————

An excellent response. As the original question had to do with using ‘IF EXIT’ I’ll just point out that the above examples could just as easily have used ‘IF EXIT’ and ‘IF NOT EXIT’ rather than ‘= *ON’ as the fields are defined as indicator fields.

Bruce Vining

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Sloopy
    Here, we don't use indicators with function keys. This frees up 24 indicators. However, in ILE programming we shouldn't be using many indicators anyway! If anyone is interested in indicator-less function keys, let me know and I'll publish the code. I do believe that it's pretty common knowledge, anyway - and I would bet that Bruce probably does it better! Regards, Sloopy
    2,195 pointsBadges:
    report
  • bvining
    I don't know about better or worse, but I agree with you -- I don't use indicators for function keys either :)
    6,465 pointsBadges:
    report
  • NarasimhaReddy
    If you are using COBOL, Conditional names can be used to use Indicators in a better way while using seperate indicator area.
    225 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following