IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

NATURAL trick: Invoking ISPF services directly from NATURAL


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jan 19, 2006 12:12 pm
Reply with quote

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
View user's profile Send private message
Smin

New User


Joined: 11 Aug 2005
Posts: 7
Location: China

PostPosted: Tue Jul 18, 2006 3:40 pm
Reply with quote

can u explain more detail, i'm a rookie
thx
Back to top
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Wed May 16, 2007 4:12 pm
Reply with quote

What if we are using CICS TP System????
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Question regarding ISPF tables with T... TSO/ISPF 11
No new posts Extract ISPF table column headings CLIST & REXX 2
No new posts Preserve changes to ISPF Panel Variables TSO/ISPF 5
No new posts can an ISPF appl save user changes in... TSO/ISPF 14
No new posts Unload and Load ISPF Table TSO/ISPF 4
Search our Forums:


Back to Top