MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invoking a REXX program from JCL
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Wed Jan 15, 2003 6:58 am    Post subject: Reply with quote

Can you please elaborate a little on this. How and where will the panel be displayed if we have a DISPLAY PANEL in the REXX routine. It will be great also if you elaborate a little on how it is helpful for edit macros.

Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon May 05, 2003 8:34 am    Post subject: Reply with quote

I tried to submit a JCL from REXX (ISPF environment).

But I received an error message with return code = 998
Code:

1READY                                                                         
 ISPSTART CMD(NDMFPROD 'PVSAM.CICS.FTPJOB' 'T.ROARFTP1.FTP.FTPJOB')             
   ISPT036 Table in use            -/-TBOPEN issued for table ISPSPROF that is in use, ENQUEUE failed.



Here is the JCL that I used

Code:

//TSOBAT4  EXEC PGM=IKJEFT1A,DYNAMNBR=200                     
//STEPLIB  DD  DSN=ENDEVOR.PROD.LOAD,                         
//             DISP=SHR                                       
//SYSEXEC  DD  DSN=T.CRD.A427XXX.ROAR.SOURCE,                 
//             DISP=SHR                                       
//ISPPLIB  DD  DSN=SYS2.USER.ISPPLIB,                         
//             DISP=SHR                                       
//ISPSLIB  DD  DSN=T.CRD.A427XXX.ROAR.ISPSLIB,               
//             DISP=SHR                                       
//ISPTLIB  DD  DSN=T.CRD.A427XXX.ROAR.ISPSLIB,               
//             DISP=SHR                                       
//ISPPROF  DD  DSN=&SYSUID..ISPF.ISPPROF,                     
//             DISP=SHR                                       
//ISPMLIB  DD  DSN=ISP.SISPMENU,                             
//             DISP=SHR                                       
//SYSPRINT DD  SYSOUT=*                                       
//SYSTSPRT DD  SYSOUT=*                                       
//SYSTSIN  DD  DSN=T.CRD.A427XXX.ROAR.CNTLCARD(NDMFPROD),     
//             DISP=SHR                                       


Here is the Control Card details

Code:

ISPSTART CMD(NDMFPROD 'PVSAM.CICS.FTPJOB' 'T.ROARFTP1.FTP.FTPJOB')


Can you please help me resolve this issue
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Mon May 05, 2003 10:17 am    Post subject: Reply with quote

You have your own profile in use in TSO when you submit the job.
Add a step like this in front (you may only need the profile dataset)
Code:

//CREATE  EXEC PGM=IEFBR14                           
//SYSPRINT DD SYSOUT=*                               
//SYSUDUMP DD SYSOUT=*                               
//ISPPROF  DD DSN=&&ISPPROF,DISP=(,PASS),             
//            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),   
//            RECFM=FB,LRECL=80                       
//ISPTLIB  DD DSN=&&ISPTLIB,DISP=(,PASS),             
//            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),   
//            RECFM=FB,LRECL=80                       
//ISPTABL  DD DSN=&&ISPTABL,DISP=(,PASS),             
//            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),   
//            RECFM=FB,LRECL=80

And then use that temp file(s) in the next step.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue May 06, 2003 1:59 am    Post subject: Reply with quote

taltyman,

I tried your suggestion. It gave me a new error saying that ISPPROF has invalid dataset characteristics. Then instead of temporary dataset I created an empty PDS and used the same in the JCL. then It gave another error saying that ISPSPROF could not be loaded. Then I just copied ISPSPROF member from my system library into the dataset which I created and tried to execute the JCL. No use, again an error
Code:

READY                                                                     
ISPSTART CMD(NDMFPROD 'PVSAM.CICS.FTPJOB' 'T.ROARFTP1.FTP.FTPJOB')       
ISPI021 Unrecoverable error in initialization of                         
command tables                                                           
ISPI022 ISPF cannot continue. ISPF abending.                             
IKJ56641I ISPSTART ENDED DUE TO ERROR+                                   
IKJ56641I USER ABEND CODE 0999  REASON CODE 00000000                     



Please help me resolve this problem
Back to top
View user's profile Send private message
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Tue May 06, 2003 4:16 am    Post subject: Reply with quote

Why don't you use Doug Nadel's BATCHPDF ?
Back to top
View user's profile Send private message Send e-mail
vikramdr
Beginner


Joined: 15 Feb 2003
Posts: 15
Topics: 11

PostPosted: Tue May 06, 2003 8:08 am    Post subject: Reply with quote

Hi,

U can call a rexx exec from the following JCL also,

//STEP001 EXEC ISPBATCH
//SYSEXEC DD DSN=ABCD.REXX,DISP=SHR <--- WHERE THE REXX CODE IS
//SYSTSIN DD *
ISPSTART CMD(pgmNAME) <---- REXX EXEC NAME
//SYSPRINT DD SYSOUT=(,),OUTPUT=(*.STD1)
//SYSTSPRT DD SYSOUT=(,),OUTPUT=(*.STD1)
//ISPFILE DD SYSOUT=*,DCB=(LRECL=80,RECFM=FB)
//SYSOUT DD SYSOUT=(,),OUTPUT=(*.STD1)
//SYSUDUMP DD SYSOUT=(,),OUTPUT=(*.STD1)
//INPARM DD * <----- PARAMETERS TO BE PASSED
Hello wordl

U can eliminate other DD statements if u don't need.

Thanks and regards,
Vikram
_________________
Vikram
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue May 06, 2003 9:15 am    Post subject: Reply with quote

ISPBATCH is a local mod, not part of z/OS.
Back to top
View user's profile Send private message Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue May 06, 2003 9:31 am    Post subject: Reply with quote

I saw that program. But in that we have to invoke the REXX program ( BATCHPDF ) which inturn generates a JCL which then submits another REXX routine. But, I don't want to do that way. This rexx which I am trying to execute is actually a part of a big jcl which has many steps. I don't want to generate the JCL via REXX.

I would be grateful if anyone suggests me a way to invoke rexx routine from a jcl with ISPF environment.

Thanks,
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Tue May 06, 2003 10:16 am    Post subject: Reply with quote

Can you post the code for NDMFPROD?
Also in an earlier post you have your skeleton and table dsns the same. Did you intend it to be that way?
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Tue May 06, 2003 10:46 am    Post subject: Reply with quote

Just reread some of your posts and realized that your ispprof wasn't the original problem. It appears to be table related (the ispsprof name faked me out). At any rate....
If you are going to write to a table then the ddname is probably isptabl not isptlib. You can have multiple datasets allocated to isptlib. For isptabl only 1.
Again verify ISPTLIB DD DSN=T.CRD.A427XXX.ROAR.ISPSLIB is the correct dsn.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue May 13, 2003 10:53 pm    Post subject: Reply with quote

Sorry for the delay,

I tried all your suggestions but I'm still facing problems.

It either says
Code:

ISPI021 Unrecoverable error in initialization of                         
command tables                                                           


or

Code:

ISPSTART CMD(NDMFPROD 'PVSAM.CICS.FTPJOB' 'T.ROARFTP1.FTP.FTPJOB')             
   ISPT036 Table in use            -/-TBOPEN issued for table ISPSPROF that is in use,


Is it not working only for me ? did you try out the code ?

Here is the REXX routine, I'm trying to invoke (NDMFPROD)
Code:

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */         
/*                     REXX   MACRO                          */         
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */         
/*                                                           */         
/*   REXX MACRO TO NDM A FILE FROM PROD REGION TO TEST.      */         
/*                                                           */         
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */         
                                                                       
  ARG ARGUMENTS                                                         
                                                                       
  PARSE UPPER VAR ARGUMENTS PRODFILE TESTFILE                           
  SAY PRODFILE                                                         
  SAY TESTFILE                                                         
                                                                       
 "ISPEXEC LIBDEF ISPSLIB DATASET ID('T.CRD.A427XXX.ROAR.ISPSLIB')STACK"
  ADDRESS TSO 'PROFILE NOINTERCOM'                                     
                                                                       
  DSN1 = '&DSN1='||PRODFILE                                             
  DSN2 = '&DSN2='||TESTFILE                                             
                                                                       
 "ISPEXEC FTOPEN TEMP"                                                 
 "ISPEXEC FTINCL NDMFPROD"                                             
 "ISPEXEC FTCLOSE"                                                     
 "ISPEXEC VGET (ZTEMPF) SHARED"                                         
 SAY ZTEMPF                                                             
 /*                                                                     
  CALL OUTTRAP 'STEM.'                                                 
 "SUBMIT '"ZTEMPF"'"                                                   
    CALL OUTTRAP 'OFF' */                                               
    EXIT 0                                                             
                                                                       
  CALL SYSCALLS 'ON'                                                   
  LMSG   = MSG('OFF')                                                   
                                                                       
  DO FOREVER                                                           
       ADDRESS SYSCALL 'SLEEP 2'                                       
       REASON = SYSDSN("'"TESTFILE"'")                                 

       IF REASON = 'OK' THEN                                           
        DO                                                             
             SAY 'NDM COMPLETED !!!'                                   
             TERMINATE_FLAG = 'TRUE'                                   
             LEAVE                                                     
        END                                                             
       SAY 'DATASET STILL IN USE'                                       
  END                                                                   
                                                                       
  LMSG   = MSG('ON')                                                   
  CALL SYSCALLS 'OFF'                                                   
  ADDRESS TSO 'PROFILE INTERCOM'                                       
  EXIT 0                                                               
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed May 14, 2003 1:39 am    Post subject: Reply with quote

The problem is still your allocations. You need the system tables found in the system's ISPTLIB. You'll also need to have separate copies of profiles that don't conflict with ones already open by your online TSO id. Since you are using file tailoring, you may need an output library too to avoid conflicts (or ISPCTL1 in the JCL).

Using the BATCHPDF program to create your initial JCL has been suggested twice already, but you've chosen to ignore the advice. It will give you a good starting point.
Back to top
View user's profile Send private message Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed May 14, 2003 5:13 am    Post subject: Reply with quote

I just now, tried the BATCHPDF stuff. Its working great. When I first read the code I misunderstood it and thats why I didn't try it.


Thanks a lot for your suggestions. I should have tried it before itself. I wasted lot of my time and yours too.

Thanks,
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu May 15, 2003 3:40 am    Post subject: Reply with quote

Hi,

My job runs a REXX routine (NDMFPROD) which inturn submits a NDM Jcl which actually runs in a different region and NDMs a file to PRODPLEX to TESTPLEX. This is working fine now.

But, once the Rexx submits the NDM Jcl, I receive a message saying that a Job has been submitted. Usually I give TSO PROFILE NOINTERCOM to stop such messages and also to suppress the message which is displayed once the JCL is completed.

In my rexx routine, I have specified ADDRESS TSO "PROFILE NOINTERCOM" command. But still I receive all the messages once the job is submitted, & once the job is completed. In my rexx I tried to find the status of PROFILE command. It says NOINTERCOM.

See below
Code:

READY                                                                           
PROFILE NOINTERCOM                                                             
READY                                                                           
ISPSTART CMD(NDMFPROD 'PVSAM.CICS.FTPJOB' 'T.ROARFTP1.FTP.FTPJOB')             
'PVSAM.CICS.FTPJOB'                                                             
'T.ROARFTP1.FTP.FTPJOB'                                                         
SYS03135.T042326.RA000.TSONJAYX.R0137240                                       
IKJ56688I CHAR(0)  LINE(0)    PROMPT   NOINTERCOM NOPAUSE MSGID   MODE    WTPMSG
E(ENU)                                                                         
IKJ56689I DEFAULT LINE/CHARACTER DELETE CHARACTERS IN EFFECT FOR THIS TERMINAL 
IKJ56688I CHAR(0)  LINE(0)    PROMPT   NOINTERCOM NOPAUSE MSGID   MODE    WTPMSG
E(ENU)                                                                         
IKJ56689I DEFAULT LINE/CHARACTER DELETE CHARACTERS IN EFFECT FOR THIS TERMINAL 
DATASET NOT FOUND                                                               
UNAVAILABLE DATASET                                                             
NDM COMPLETED !!!                                                               


Later I tried to give the NOINTERCOM command on the command line manually before invoking the JCL. Then it works fine. Can anybody please tell me why the command is not working when coded in the rexx routine (Before the rexx submits the NDM jcl).
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Thu May 15, 2003 7:15 pm    Post subject: Reply with quote

Perhaps this is the answer to your question :-

THE USER PROFILE IS RETAINED THROUGHOUT EACH TERMINAL SESSION
UNLESS THE USER WISHES TO CHANGE IT BY ISSUING THE PROFILE COMMAND
AGAIN AND SPECIFYING THE APPROPRIATE OPERANDS. CHANGES MADE WHILE
PROCESSING IN THE BACKGROUND WILL NOT BE SAVED AND YOUR FOREGROUND
PROFILE WILL NOT BE AFFECTED.

_________________
Regards,
Mike.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group