| View previous topic :: View next topic |
| Author |
Message |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12401 Topics: 75 Location: San Jose
|
Posted: Thu Jan 29, 2004 1:23 pm Post subject: |
|
|
Dibakar,
I don't think that there is a way to find which class is free. But there are ways to fool other jobs and let your jobs get executed first. One way to do is code a highest prty value on the Jobcard. The jobs with higher priority get execueted first. But if you start doing this quite often then your ID might get suspended for absuing the prty parameter.
Solution:2
Let us assume that you are allowed to run your jobs in 4 different classes namely A, B, C, D
Since you are dynamically generating the jobs, submit the first job to class A, second to class B , third to class C and the fourth to class D. Repeat the same process for all of your jobs. By doing so you are evenly splitting the jobs between classes.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
| Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 702 Topics: 64 Location: USA
|
Posted: Fri Jan 30, 2004 2:32 am Post subject: |
|
|
Hi kolusu,
The solutions won't work as I need to execute the job in sequence. So whichever class I find free, I would submit all of them in the same class.
Maybe, as a test I could submit a small dummy job in all the classes to find which one started first and then use that class for others.
Thanks,
Diba. |
|
| Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12401 Topics: 75 Location: San Jose
|
Posted: Fri Jan 30, 2004 6:48 am Post subject: |
|
|
Dibakar,
| Quote: |
The solutions won't work as I need to execute the job in sequence
|
hmm in that case can't you just build one huge job with each step being a single job?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
| Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 702 Topics: 64 Location: USA
|
Posted: Wed Feb 25, 2004 8:03 am Post subject: |
|
|
Kolusu,
This solution won't work because these are mostly compile and link edit jobs so combining them will confuse user. Morover we have to save these jobs too.
Here's a primitive way of finding good class -
| Code: |
/* This REXX finds a good class to submit jobs
Input : None
Output: Job Class
*/
GOODCLASS:
/* These are the classes I am authorised too */
class.1 = 'C'; class.2 ='D'; class.3 = 'L'
class_cnt = 3
/* submit jobs with above classes */
do c = 1 to class_cnt
/* Set up job */
queue "//"userid()"Z JOB (3401,S440),8048.NIIT,CLASS="class.c
queue "//DUMMY000 EXEC PGM=IEFBR14"; queue ""
"ALLOC F(INTRDR) RECFM(F) LRECL(80) SYSOUT(A) WRITER(INTRDR)"
"EXECIO * DISKW INTRDR (FINIS"
"FREE F(INTRDR)"
end
/* Lets see these jobs */
x = outtrap("line.","*")
address tso "status TS09065Z"
x = outtrap("OFF")
prev_jobnum = line.0 - class_cnt
/* Find the good class */
class = class.1
status.1 = 'EXECUTING'; status.2 = 'ON OUTPUT QUEUE'
status_cnt = 2
do s = 1 to status_cnt
do c = 1 to class_cnt
l = c + prev_jobnum
if (word(line.l,4) = word(status.s,1)) then class = class.c
end
end
return class
exit 0
|
|
|
| Back to top |
|
 |
Maton_Man Beginner

Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Wed Feb 25, 2004 8:54 pm Post subject: |
|
|
Quote: -
"Mike, I will quite try and do what you have mentioned...Learn REXX myself with inputs from you guys here at the forum..
Also as Diba pointed out, REXX is not part of my job & hence can't find I will have to learn in free time too.. "
I don't know anyone who could claim that learning rexx is part of their job - it is a utility language - you learn it because it is useful not because it is necessary. It is not our job to write code for you either. ISPF isn't 'part of your job' either but I bet you use it quite happily albeit not necessarily efficiently.
Why are you using Rexx at all if you don't want to bother learning it yourself?
Asking for code is lazy and will not help you in the long run.
The problem you are seeking to overcome could be written in any of the major programming languages supported on the mainframe so why pick a language you don't know? You could even write it in COBOL (God forbid). _________________ My opinions are exactly that. |
|
| Back to top |
|
 |
|
|
|