To submit JCL via REXX



IBM's Command List programming language & Restructured Extended Executor

To submit JCL via REXX

Postby bobguo » Thu Oct 17, 2013 10:36 am

/* REXX */                                                     
user = USERID()                                                 
queue "//"user"B JOB 'BOBGUO',CLASS=A,NOTIFY="user",MSGCLASS=A "
queue "//REXX  EXEC PGM=IKJEFT01,     "                         
queue "//          PARM='REXX1'       "                         
queue "//SYSTSPRT DD SYSOUT=*         "                         
queue "//SYSTSIN DD DUMMY             "                         
queue "//SYSPROC DD  DSN=XXXXX.REXX,DISP=SHR   "               
queue "//                             "                         
queue "$$                             "                         
o = OUTTRAP("output.",,"CONCAT")                               
ADDRESS TSO "SUBMIT * END($$)"                                 
o = OUTTRAP(OFF)                                               
say output.1                                                   
say output.2                                                   
RETURN       


i am new to rexx and this is one sample program copied from book. but when i ran it, i got one problem below, can somobody help me to resolve it, thanks.


IKJ56701I MISSING END CHARACTER(S)+
IKJ56701I MISSING ONE OR TWO CHARACTERS (I.E. ALPHABETIC, NUMERIC, OR NATIONAL)
THAT WILL TERMINATE THE INPUT JOB STREAM
A command entered or contained in a CLIST has invalid syntax.
***
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Re: To submit JCL via REXX

Postby NicC » Thu Oct 17, 2013 4:13 pm

I had a bit of trouble doing it like that but after a bit of reading I now use this:
Do i = 1 To output_jcl.0
   Queue output_jcl.i
End
Queue
o = Outtrap("output.",,"CONCAT")
"SUBMIT *"
o = Outtrap(OFF)

But before doing that - do not do the submit but display what you are putting onto the queue to check that it looks OK.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: To submit JCL via REXX

Postby Pedro » Thu Oct 17, 2013 9:15 pm

The help from SUBMIT, re: END parameter:
WHEN TERMINATING THE INPUT JOB STREAM, THE CHARACTER(S)
MUST BEGIN IN COLUMN 1 AND BE THE ONLY DATA ON THE INPUT LINE.


But you also queued many trailing blanks. Try:
queue "$$" 
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: To submit JCL via REXX

Postby bobguo » Fri Oct 18, 2013 7:42 am

ADDRESS TSO "SUBMIT *"

it works.
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Re: To submit JCL via REXX

Postby NicC » Fri Oct 18, 2013 1:21 pm

You do not need the ADDRESS TSO - by default your exec executes in the TSO address space.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

These users thanked the author NicC for the post:
bobguo (Fri Oct 18, 2013 2:33 pm)
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post