|
|
| Author |
Message |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1897 Location: Israel
|
|
|
|
Hi all -
ISPF services can be very useful for some requirements. For example - manipulating members and datasets, displaying panels, interfacing with ISPF tables, generating jobs with skeletons etc.
Here is an example of how to invoke ISPF services directly from within NATURAL. This example uses the ISPLINK interface (as opposed to ISPEXEC interface). Pay attention that you can build your parameters list as constants or as a group of variable. In my example you'll see both types (the CONTROL services are constants; the VIEW service is a group of variables).
For a list of all ISPF services, see the manual: ISPF Services Guide. The ISPLINK interface is well documented in section 1.3.3 of the same manual.
| Code: |
DEFINE DATA LOCAL
1 #ISPLINK-VIEW
2 #ISPF-SERV (A008)
2 #ISPF-DATASET (A056)
2 #ISPF-VOLUME (A006)
2 #ISPF-PASSWORD (A008)
2 #ISPF-PANEL (A008)
2 #ISPF-MACRO (A008)
2 #ISPF-PROFILE (A008)
2 #ISPF-DATAID (A008)
2 #ISPF-MEMBER (A008)
2 #ISPF-FORMAT (A008)
2 #ISPF-MIXED (A003)
2 #ISPF-CONFIRM (A003)
2 #ISPF-WSFN (A008)
2 #ISPF-WS (A003)
2 #ISPF-CHGWARN (A003)
2 #ISPF-PARM (A008)
1 #RET (I004)
END-DEFINE
*
IF *TPSYS NE 'TSO'
STOP
END-IF
*
#ISPF-SERV := 'VIEW '
#ISPF-DATASET := "'OFERF.A.REXX(TEMP)'"
*
CALL 'ISPLINK' 'CONTROL ' 'DISPLAY ' 'REFRESH
CALL 'ISPLINK' 'CONTROL ' 'ERRORS ' 'RETURN
*
CALL 'ISPLINK' #ISPLINK-VIEW
#RET := RET('ISPLINK')
WRITE 'RET FROM VIEW ' #RET
*
CALL 'ISPLINK' 'CONTROL ' 'DISPLAY ' 'REFRESH
*
END |
O. |
|
| Back to top |
|
 |
References
|
Posted: Thu Jan 19, 2006 12:12 pm Post subject: Re: NATURAL trick: Invoking ISPF services directly from NATURAL |
 |
|
|
 |
Smin
New User
Joined: 11 Aug 2005 Posts: 7 Location: China
|
|
|
|
can u explain more detail, i'm a rookie
thx |
|
| Back to top |
|
 |
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 95 Location: Hyderabad
|
|
|
|
| What if we are using CICS TP System???? |
|
| Back to top |
|
 |
|
|