| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
ofer71
Joined: 27 Dec 2005
Posts: 1959
Location: Israel
|
| Posted: Thu Jan 19, 2006 12:12 pm Post subject: NATURAL trick: Invoking ISPF services directly from NATURAL |
|
|
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 |
|
Smin
Joined: 11 Aug 2005
Posts: 7
Location: China
|
| Posted: Tue Jul 18, 2006 3:40 pm Post subject: |
|
|
can u explain more detail, i'm a rookie
thx |
|
| Back to top |
|
monasu1998
Joined: 23 Dec 2005
Posts: 96
Location: Hyderabad
|
| Posted: Wed May 16, 2007 4:12 pm Post subject: Re: NATURAL trick: Invoking ISPF services directly from NATU |
|
|
| What if we are using CICS TP System???? |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|