MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there any JES2 command to list out long running jobs !!
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Nov 29, 2005 11:35 pm    Post subject: Reply with quote

Quote:
ACB control block structure changes in production
Smile It will not change.

To learn about, ASCB or MVS Data Areas in general, you have to refer to any of the 5 manuals that IBM has for MVS Data Areas. Use this link and select the Vol I.
MVS Data Areas
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
nevilh
Beginner


Joined: 11 Aug 2004
Posts: 115
Topics: 0

PostPosted: Wed Nov 30, 2005 2:18 am    Post subject: Reply with quote

Quote:
It will not change


Please do not make statements like this as they are misleading. The ASCB has been changed twice this year alone. Agreed IBM have improved and tend to make changes in areas that do not affect existing code. But this doesn't mean they won't.
While I am on my soap box I would like to question the sanity of anyone who would implement a REXX they have downloaded from the internet and don't fully understand in a production environment
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Nov 30, 2005 2:59 am    Post subject: Reply with quote

nevilh,
Quote:
The ASCB has been changed twice this year alone.


I have read at some places that corrborate what you have said. But, please note Amit's question. He wanted to know, whether his production environment ASCB would be different from that in development.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Nov 30, 2005 3:34 am    Post subject: Reply with quote

The CVT, ASVT, ASCB, CSCB and RMCT are documented in the data areas books. The books list fields that are approved programming interfaces and fields that are not. WHile writing this program, I didn't check if the fields I used are valid programming interfaces. ASCBINTS is not listed as a programming interface and neither is RMCTTOC. CHTRKID isn't even documented correctly. It works as it always has, but isn't part of the interface either. CVTASVT is approved and the ASVT itself is unclearly documented (no fields are listed, but none are excluded either), but everyone uses these particular ASVT fields so they are unlikely to change.

Now... will these fields or their offsets change? I doubt it, at least in the near term, since there is lots of software out there that uses them (except for RMCTTOC), but it is possible, especially since they deal with things like the hardware clock. If the hardware clock changes to be more than 64 bits, and it could considering that it rolls over in 2041, then all of these control blocks could change. It may have already changed in a recent architecture level and I didn't notice, but these fields haven't changed. Also, MVS always tries to keep commonly used interfaces backward compatible if it is at all possible. (The subsystems like JES2 are another story -- they frequently change internals).

I have to agree with nevilh. Taking a program like this and throwing it into production without understanding it is dangerous. This one, for example uses the field RMCTTOC which is part of the system resource manager (SRM). I simply looked in likely control blocks until I found one that had a fairly up-to-date clock value because I can't issue a STCK instruction in Rexx. Normally, a program like this would call an assembler program to issue an STCK to get the current time, so this is really a 'hack'. But SRM appears to update the RMCT often enough (several times per second) for a program like this to be OK using it.

If this program breaks, it will be because of a change in the hardware architecture, or exploitation of changes that have already occured (or because I guessed wrong at what these fields really do), but if the architecture changes, this little program will be the least of the conversion efforts.

To answer your other question...
The program will only list jobs. TSO users, started tasks, and system tasks have different values for the CHTRKID field. Unix tasks share the same value as jobs but I excluded them by checking a field in the associated OUCB control block. The exec I modified to create this shows all the system tasks and can be found here.
Back to top
View user's profile Send private message Visit poster's website
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Wed Nov 30, 2005 8:28 am    Post subject: Reply with quote

I'm agree with nevilh, though I've downloaded lots of programs/utilities from Doug or CBT or Lionel B.D .... In case I want to put it in Production I take care of understand it.

the other question, as said, I really hope IBM keep changing any Data Areas in areas that do not affect existing code... could happen but I do hope not.
Back to top
View user's profile Send private message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Sun Dec 18, 2005 11:18 pm    Post subject: Reply with quote

Hey Seemigeezer thanks for the update on Doug's REXX and I am grateful that you explained the queries of mine in such a descriptive manner. I really appreciate that.
I have gone thru the MVS data areas manual and got the offsets of all the CVT, ASVT, RMCT, ASCB and CSCB control blocks.

I have only the following queries:

a) why do we do a (ASVTMAXU - 1) while performing the DO loop on the MAX entries found in the ASVT Control block ??
b) Is there any document where I can check what values in the control block is for what ?? I mean for e.g. CHTRKID = '03' x for Batch jobs and UNIX tasks, '02' x is for STC and things like that... Also, where can I find information regarding oucbomvs in ASCB Data Area ?? The MVS Data Areas book only gives information regarding the offset, it doesnt explain each field in detail.

Thanks,
Amit Joshi
Singapore.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sun Dec 18, 2005 11:25 pm    Post subject: Reply with quote

I was wondering where I got that about the CHKTRKID too when I wrote the last post. I did not see it in the books so it may have been just finding it by "trial and error".
I also don't remember why ASVTMAXU - 1 is used. I seem to recall some documentaiton on that, but I don;t see it now. Anyone know? is that even correct?
Back to top
View user's profile Send private message Visit poster's website
MikeBaker
Beginner


Joined: 04 May 2004
Posts: 96
Topics: 9

PostPosted: Mon Dec 19, 2005 4:26 am    Post subject: Reply with quote

Code:

 BROWSE    SYS1.MODGEN(IEECHAIN)                      Line 00000199 Col
 Command ===>                                                  Scroll ==
CHPKE    DS    0CL1 -    PROTECT KEY (OS/VS1)                    ICB345
CHTRKID  DS    CL1 -     DISPLAY/TRACK IDENTIFIER (OS/VS2)       MDC014
CHTSID   EQU   X'01' -   TIME SHARING USER IDENTIFIER            MDC015
CHJOBID  EQU   X'02' -   JOB IDENTIFIER                          MDC016
CHINITID EQU   X'03' -   INITIATOR IDENTIFIER                    MDC017
CHSASID  EQU   X'04' -   SYSTEM ADDRESS SPACE IDENTIFIER               *
                                                      (MDC313) @G38EP2L
CHATXPID EQU   X'05' -   ATX ADDRESS SPACE IDENTIFIER              @L9A
CHATXID  EQU   X'05' -   ATX ADDRESS SPACE IDENTIFIER              @L9A


And to interpret OUCBOMVS, checkout SYS1.MODGEN(IRAOUCB) which tells how the ASCB points to it (NB: It's not in the ASCB).

Mark Zelden also has a REXX which says "ASVTMAXU-1", and his comment for this line of code is "start at 0 so I*4 bumps to next entry... "
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Mon Dec 19, 2005 11:37 am    Post subject: Reply with quote

I gotta stop answering questions when I'm exhausted. Obviously the asvtmaxu-1 is an offset issue because of the calculation of addresses is not the same as an array index. And the chktrkid... oh... nevermind Smile
Back to top
View user's profile Send private message Visit poster's website
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Dec 20, 2005 8:37 pm    Post subject: Reply with quote

Hey thanks a lot Mike and Seemigeezer for your responses and pointers for the answer to my queries.

Thanks again,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
strat
Beginner


Joined: 10 Jun 2005
Posts: 3
Topics: 0

PostPosted: Thu Dec 22, 2005 4:11 pm    Post subject: Reply with quote

Check your syslog for $HASP308. If you have it, use automation to generate a console alert. The message will be $HASP308 'jobname' ESTIMATED TIME EXCEEDED BY '##' MINUTES.
I don't know what automation tool you use but if it is CA-OPSMVS
Rexx code:
Code:

)MSG $HASP308                                                 
)INIT                                                         
)PROC                                                         
PARSE VAR MSG.TEXT W1 W2 W3 W4 W5 W6 W7 W8                   
IF W7 = '120' THEN DO                                         
   ADDRESS WTO                                               
   "TEXT('JOB "W2" HAS BEEN RUNNING FOR MORE THAN "W7" HOURS",
   "PLEASE INVESTIGATE.')",                                   
   "ROUTE(17) DESC(2)"                                       
)END
Back to top
View user's profile Send private message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Thu Dec 22, 2005 9:33 pm    Post subject: Reply with quote

Hey strat, this is a good one by you. The only thing is I checked my syslog and there is no $HASP308 * message there though there are jobs which are running since long there. Is there any way I can set the JES parm to give this message and then may be I can trap the message at regular intervals and throw error message if it exceeds the stipulated time ??

How to set the JES to show this message on console. Any setting needs to be done ??

Pls respond.

Thanks.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
strat
Beginner


Joined: 10 Jun 2005
Posts: 3
Topics: 0

PostPosted: Fri Dec 23, 2005 9:31 am    Post subject: Reply with quote

Check your JES2 member in your PARMLIB for ESTIME. Modify the following example so it does generate the $hasp308 when you want them:
ESTIME NUM=60, /* 60 minutes for 1st Message */
INT=60, /* then at 60 minute Intervals */
OPT=YES /* Issue $HASP308 message */
Back to top
View user's profile Send private message
strat
Beginner


Joined: 10 Jun 2005
Posts: 3
Topics: 0

PostPosted: Fri Dec 23, 2005 12:21 pm    Post subject: Reply with quote

If ESTIME is already in the JES2 member, you can display the value with $D ESTIME.
Since a JES2 restart is needed to pick up the parm change, you can dynamically change it for testing purposes by issuing:
$T ESTIME,NUM=#,INT=#,OPT=YES. Change # to whatever value you want.

I test with $T ESTIME,NUM=1,INT=1,OPT=YES. That way, the first message is generated at 1 minute and the interval is set to every minute thereafter.

Enjoy the holidays!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group