It this is something you are going to need to do on a regular basis and
do not have the support you need you may want to consider purchasing a
package that will support your needs.
You can also use WRKQRY to extract start an stop information to an
outfile for specific QHST files. This is a very quick and dirty
solution so you may want one of your iSeries developers to work up a
cleaner version. To obtain the subsystem multiple QHST records need to
be read and subsystem name cat be in a varying location in the string.
You will need two Client Access sessions for this. Each session will
need enough authority to access data files named QHSTxxxxxx.
In one session run WERKOBJ OBJ(QSYS/QHST*) OBJTYPE(*FILE)
In the other run the following steps
1) From a command line type in WRKQRY.
2) Take option 1. Provide a name and library for the query.
3) At the "Define the Query" screen:
a) Take option 1 against "Specify file selections".
Supply the first QHSTxxxxxx file and library you wish to
report over.
Copy/past the names from the other Client Access session.
b) Take option 1 against "Define result fields". Enter the
following definitions.
Field Expression Column
Heading
DATE substr(syslogfld, 38, 6) Date
(YYMMDD)
--------
TIME substr(syslogfld, 44, 6) Time
HHMMSS
------
JOB substr(syslogfld, 11, 10) Job
Name
----------
USER substr(syslogfld, 21, 10) User
Name
----------
JOBNBR substr(syslogfld, 31, 6) Job
Number
------
STARTSTOP substr(syslogfld, 50, 7) CPF
Message
-------
MSGLIB substr(syslogfld, 57, 10) Messge
Library
----------
c) Take option 1 against "Select and sequence fields". Make the
following selections.
Seq Field
10 STARTSTOP
20 MSGLIB
30 JOB
40 USER
50 JOBNBR
60 DATE
70 TIME
d) Take option 1 against "Select records". Make the following
selections. You may want to add a date selection. Dates are in YYMMDD
format. CPF1124 is the
message for job start and CPF1164 is for job end.
Field Test Value
STARTSTOP LIST 'CPF1124' 'CPF1164'
e) Take option 1 against "Select sort fields". Make the
following selections.
Sort
Prty A/D Field
10 A JOBNBR
20 A JOB
30 A USER
40 A DATE
50 A TIME
f) Take option 1 against "Select output type and output form".
Make the following selections.
Output type of 3 for database
Form of output of 1 for detail
Line wrapping of N for No.
Press Enter to view the database file naming screen. Name
the file so it makes sense to you.
File . . . . . . . . . yournamingconvention
Library . . . . . . yourlibraryname
Member . . . . . . . . *FILE
Data in file . . . . . 2
For a new file:
Authority . . . . . *ALL
Text . . . . . . . . a description that
makes sense to you
f) When you are back on the "Define the Query" screen press F5
to preview the contents of the file you will be creating.
To actually create the file press F3 to stop defining the Query. Select
to save the query and your run option. Then name the query.
For the next QHSTxxxxxx file in your list use option 2 to change the
query definition you just created. All you will need to change is the
file name (Specify file selections) and the output file name if you want
to retain the previous runs data.
Oscar Navas wrote:
Hello.
First of all, I am not a programmer, so what I'm looking for is some
sort of guidance with a project I have. I know AS/400 from a
user/administrative perspective but I have been asked to come up with a
way to export the start and end times of jobs running in QBATCH
subsystem to a flat file that then can be exported to a document such
as a spreasheet. This is to reflect the times both start, end and the
obtain the elapsed time for a series of jobs that run in a daily basis.
Since I have no prior programming experience on RPG or COBOL or the
sort, I have no clue on how to do this (well, so maybe someone can
start by recommending me to study programming in this environment but I
would like to take that approach only if necessary) I have tools such
as the entire IBM ISeries Access for Windows kit (That comes with a
green screen 5250 emulator and Windows Navigator interface) but cannot
seem to find a way to do that here. If I could only find a way to
capture the start and end times of jobs (from job log) and export that
information to a file, that's basically all I need.
Any one has any idea? Maybe someone can even refer me to a proper
forum. Thanks a lot for any help.....In advance.
Regards,
Moris
rpg400-l-owner@xxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.