Submitting JCL in REXX



IBM's Command List programming language & Restructured Extended Executor

Submitting JCL in REXX

Postby seethap » Thu Nov 09, 2017 4:53 pm

Hi all,

In REXX, I have created a JCL using skeleton and submitted the same using SUBMIT command.

I want to view the output dataset once after successful completion of the Job submiited.

1. what is the command to be given in REXX to check whether the job is submitted successfully.
2. I guess, command used for viewing the dataset is ADDRESS ISPEXEC "VIEW DATASET ("FILE1")"

Many thanks,
Pazy
seethap
 
Posts: 6
Joined: Tue Sep 30, 2014 9:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Submitting JCL in REXX

Postby seethap » Thu Nov 09, 2017 8:46 pm

can someone help me on this.

I want to view the output dataset after the submitted job gets maxcc=0.

Thanks.
seethap
 
Posts: 6
Joined: Tue Sep 30, 2014 9:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Submitting JCL in REXX

Postby enrico-sorichetti » Thu Nov 09, 2017 9:05 pm

we reply on our own time and free of charge
( when and if we feel like )
if You have time constraints a paid consultant will be happy to provide his/her services according to Your timeline
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Submitting JCL in REXX

Postby Robert Sample » Thu Nov 09, 2017 9:08 pm

1. MAXCC is a term used in IDCAMS -- and it is ONLY used for IDCAMS. Saying "submitted job gets maxcc=0" is flat-out WRONG. Besides, what if the job gets a non-zero condition code?
2. Have you searched the forum yet? What you want to do comes up fairly frequently, so there are other replies you could find.
3. Submitting a job from REXX is not the issue -- the job may then sit on the input queue for HOURS before it executes; you do not want to tie up your terminal until the job completes.

can someone help me on this.
Responses on this forum are voluntary -- as in, people respond when they have the knowledge, and the interest, and the time to respond. It is not at all unusual for days -- or weeks -- to pass between a post and a response to it. This is normal. If you need immediate response, you need to persuade your management to hire a consultant for you, or talk to your co-workers or team lead or manager or site support group for assistance. Prompting for responses as you have done makes it LESS likely you will get responses since people who could respond will not be as interested in responding since you're obviously impatient and they're not going to want to be hassled for responses.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Submitting JCL in REXX

Postby Pedro » Thu Nov 09, 2017 11:44 pm

FYI. Job output does not go to a dataset. It depends on the MSGCLASS specified on the job card. Specify a MSGCLASS that will remain in the JES hold queue.

Use the SDSF REXX API to retrieve the job output from the JES held queue. It requires a bit of skill to use the API. When you submit the job, it returns the job number. Use the job number to retrieve the output later.
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: Submitting JCL in REXX

Postby Pedro » Fri Nov 10, 2017 4:38 am

re: "Job output does not go to a dataset."

Many utilities use a SYSPRINT DD statement. You can specify a data set name in the DD statment. When you job ends, you can view the data set, as you suggested, and determine the success of the job.
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: Submitting JCL in REXX

Postby willy jensen » Fri Nov 10, 2017 2:20 pm

Well,
1. what is the command to be given in REXX to check whether the job is submitted successfully.
I think that you mean 'whether the job has completed successfully'. Checking submit in itself is not very usefull. For checking job status, I would use the SDSF REXX API, described in the SDSF manual. Bearing in mind that what constitutes successful execution varies from job to job. And that there may be more than one job with the same name.

2. I guess, command used for viewing the dataset is ADDRESS ISPEXEC "VIEW DATASET ("FILE1")"
Yes, if you want to view a dataset created by the job. If you want to look at job log, job messages and job sysout, you should again use the SDSF REXX API. There is a TSO OUTPUT command, but that has some limitations. If the dataset is created in the job, then you could possibly consider the prescence of the dataset an indicator of a successfull job. In that case you could loop around the VIEW command a number of times till it succeeds, or the limit is reached. Pausing a few seconds between iterations. Personally I would go with the SDSF REXX API though.
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times

Re: Submitting JCL in REXX

Postby enrico-sorichetti » Fri Nov 10, 2017 4:04 pm

and ... at what time the supposed rexx should be run ???

the topic is just a waste of resources and time for everybody ...
the TS does not have the slightest idea of the flow and timings of

submit
execute
able to look at the result of the execution
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post