85 pts.
 how can we use ponter in function keys?
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.

Software/Hardware used:
ASKED: April 7, 2008  12:31 PM
UPDATED: April 16, 2008  5:02 AM

Answer Wiki:
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
Last Wiki Answer Submitted:  April 12, 2008  11:22 pm  by  kevleemor   605 pts.
All Answer Wiki Contributors:  kevleemor   605 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 

I don’t know about better or worse, but I agree with you — I don’t use indicators for function keys either :)

 6,055 pts.

 

If you are using COBOL, Conditional names can be used to use Indicators in a better way while using seperate indicator area.

 225 pts.