× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jim Sloan's TAATOOLs has a tool called SNDTIMRCD. It is a command that can be placed ANYWHERE in a program to send a record to a special journal. In this case the TIMRCD journal.

This journal can then be analyzed to provide timing information.

For example:

PGM
SNDTIMRCD TIMGRP(BACKUP) TEXT('BACKUP - START') JRN(TIMRCD/TIMRCD)
SNDTIMRCD TIMGRP(D_BU30) TEXT('D_BU30 - START') JRN(TIMRCD/TIMRCD)
...
Call D_BU30
...
SNDTIMRCD TIMGRP(D_BU30) TEXT('D_BU30 - END') JRN(TIMRCD/TIMRCD)
SNDTIMRCD TIMGRP(D_BU40) TEXT('D_BU40 - START') JRN(TIMRCD/TIMRCD)
...
Call D_BU40
...
SNDTIMRCD TIMGRP(D_BU40) TEXT('D_BU40 - END') JRN(TIMRCD/TIMRCD)
SNDTIMRCD TIMGRP(BACKUP) TEXT('BACKUP - END') JRN(TIMRCD/TIMRCD)
ENDPGM

From these journal entries (which include a time stamp on each one) you can now determine how long the whole process ran and how long each CALL step ran...


Kenneth
Kenneth E. Graap
http://www.linkedin.com/in/kennethgraap


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Luis Rodriguez
Sent: Saturday, December 11, 2010 10:04 AM
To: Midrange Systems Technical Discussion
Subject: Re: Need to record the timing of each CALL step in a batch job...

I have just realized that this wasn't redacted properly.

In the CRTCLPGM command, the parameter LOG allows you to log each CL statement to the job log. In the CHGJOB command this can be achieved using the parameter LOGCLPGM. Alas, it seems that this does not log the parameter info.

My apologies for the incomplete info, and any confusion it may have created.

Regards,
Luis Rodriguez
IBM Certified Systems Expert - eServer i5 iSeries
--



On Sat, Dec 11, 2010 at 9:08 AM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:

Chuck,

IIRC, The LOCLPGM parameter, either on compilation or run time, does this.
The downsize is that the log files grow very fast.

Regards,

Luis Rodriguez
IBM Certified Systems Expert - eServer i5 iSeries
--



On Fri, Dec 10, 2010 at 10:56 PM, CRPence <CRPbottle@xxxxxxxxx> wrote:

On 12/8/10 1:32 PM, Charles Wilt wrote:
I have a request to start tracking the time each step takes in a
batch process...

A manual process might be, to look through the job log for

*NONE Command 12/08/10 02:29:44.407088
QCLCLCPR QSYS 04CB FS001C HLTHPRDPGM 0242
Message . . . . : 34100 - CALL PGM(PR002R)
/* The CALL command contains parameters */

*NONE Command 12/08/10 02:29:57.622312
QCLCLCPR QSYS 04CB FS001C HLTHPRDPGM 0251
Message . . . . : 34900 - CALL PGM(PR051R)
/* The CALL command contains parameters */

Obviously, a manual process would not be my preferred method, given
that this needs to be done for multiple jobs and is not a one-time
thing. Additionally, I need the specifics of the parameters used
during the call.

My thoughts
1) Use command exit point(s) process/log the CALLs, but it appears
that CALL is one command for which the exit point is not invoked.
2) Replace CALL command with custom command whose CPP does the
logging needed
3) DSPJOBLOG OUTPUT(*FILE) or maybe OUTPUT(*APIDFN) at the end of
the process, but *FILE at least doesn't provide the parameters used
during the call
4) List Job Log Messages (QMHLJOBL) API or Open List of Job Log
Messages (QGYOLJBL) API, guessing that neither of these will have
the parameter info I need either...

So it appear that my only option is option 2....

Does anybody have any thoughts, comments or alternatives?


When I have had need to do something like the described for a
specific process [e.g. a test-case or other batch script or CLP], I
typically would convert the CL or CLP to REXX to have a procedure
DoRequest which is then invoked by "DoRequest CALL PGM(...", having
replaced each "CALL PGM(...". The DoRequest procedure first does a
SAY of the request, then the request itself, and finally a summary
SAY; the former adding something like TIME() as a prefix.

FWiW, seems to me that "5) Application logging" is a better option
if the function might best, not be limited to just the one script\program:

One approach is to change the calling program(s) to invoke some
logging prior to [and probably also after] each call. Another
approach has each called program inquire [by review either of a
passed parameter or of some logging indication] to determine if a
request for logging is currently active, then log entry and optionally exit.

Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.