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

Submitting JCL through Rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Tue Nov 06, 2007 2:14 am
Reply with quote

My requirement is to submit JCL through Rexx.
So i wrote the following code:-

Code:

/* REXX */
Trace all
Address TSO
QUEUE "//TTOIRH09 JOB 0,CLASS=N,MSGCLASS=0,NOTIFY=RAWATR      "
QUEUE "//SCAN EXEC CAPKSCAN,OPTNLIBJ=SYSCAI.JMR.PPOPTION,     "
QUEUE "//      OPTNMEMJ=JMROPTQ1                              "
QUEUE "//"
QUEUE "$$"

Output = 0
X = OUTTRAP("output.",'*',"CONCAT")
Address TSO "SUBMIT * END($$)"
X = OUTTRAP('OFF')
Say output.0
Say output.1
Say output.2
Say output.3


However, The out put is:-

Say output.1
MISSING END CHARACTER(S)+

Say output.2
MISSING ONE OR TWO CHARACTERS (I.E. ALPHABETIC, NUMERIC, OR NATIONAL) THAT WILL TERMINATE THE INPUT JOB STREAM

Say output.3
EXTRANEOUS INFORMATION WAS IGNORED: $$

A command entered or contained in a CLIST has invalid syntax.

Can somebody tell me where am I wrong? Is there some problem with my installation.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 06, 2007 2:47 am
Reply with quote

Well, syntactically and logically the code is fine and worked OK for me exactly as you posted it.

Just a thought, but maybe you need to remove the null JCL line:

QUEUE "//"

Other than that, unless someone else sees something I don't, I'd show this to your Systems Programming team and solicit their input.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 06, 2007 2:57 am
Reply with quote

Hello,

Any chance that the posted code is not exactly what was executed?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 06, 2007 3:13 am
Reply with quote

Does your ISPF/PDF EDIT session show the code to be syntactically correct?
Back to top
View user's profile Send private message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Tue Nov 06, 2007 3:20 am
Reply with quote

The posted code is exactly what was executed....
Can the submit macro be used in OS/390 also?

Any sort of pointers would be appreciated.
Back to top
View user's profile Send private message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Tue Nov 06, 2007 3:26 am
Reply with quote

The ISPF EDIT shows it to be syntactically Correct....
Moreover the JCL null statement shouldn't be a problem in my opinion, cos its working for you guys....Any other pointers?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 06, 2007 3:37 am
Reply with quote

I guess You have problems of character translation/representation in
Your 3270 emulation program

I run a quick test using $$ as the end of stream
and everYthing worked

but when I checked with ++ ( obviously invalid characters )

I got exactly the same message sequence

to make debugging easier it' s a good thing to issue the command

"TSO PROFILE MSGID" in order to get the message number, to make search easier
Back to top
View user's profile Send private message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Tue Nov 06, 2007 3:41 am
Reply with quote

Hi enrico,

Thx for the reply.
Can you elaborate the sentence "but when I checked with ++ ( obviously invalid characters )". I didnt exactly get it.

Considering that what you are saying is correct, can you tell me what should i look for and how to rectify it?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 06, 2007 3:49 am
Reply with quote

Quote:
Can you elaborate the sentence "but when I checked with ++ ( obviously invalid characters )". I didnt exactly get it.


I was trying to reproduce the error, the message You received implied
a wrong definition of the end characters,
since ++ is not a valid choice, using it it confirmed my assumption.

the technique used is part of the standard debugging techniques,
check what happens when You know that what You are doing is WRONG.

while editing Your rexx, issue the command "HEX ON" and check that
the hexadecimal value for the char "$" is "5b"
Back to top
View user's profile Send private message
rajesh-amigos
Currently Banned

New User


Joined: 03 Aug 2007
Posts: 25
Location: India

PostPosted: Tue Nov 06, 2007 4:17 pm
Reply with quote

Hi Enrico,

Thanks a lot. Your suggestion worked correctly....
Another out of line question....

How can i change the value of $ to its correct value?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top