Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Submitting JCL through Rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Submitting JCL through Rexx
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

Moderator Team Head


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

PostPosted: Tue Nov 06, 2007 2:47 am    Post subject: Reply to: Submitting JCL through Rexx
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

Site Director


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

PostPosted: Tue Nov 06, 2007 2:57 am    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Nov 06, 2007 3:13 am    Post subject: Reply to: Submitting JCL through Rexx
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Tue Nov 06, 2007 3:37 am    Post subject: Reply to: Submitting JCL through Rexx
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Tue Nov 06, 2007 3:49 am    Post subject: Reply to: Submitting JCL through Rexx
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us