Chapter 4 work with jobs and How to handle messages

advertisement
REVIEW
Object types ????
System security levels - ????
Current library How is it assigned ????
How do you change it???
Qualified naming - What is it????
System values What are they ???
How do you see them????
Special values Identified How?
Where used?
Assistance levels What are the levels available ??
How do you control them???
Library lists Why used ????
Messages
Sending and receiving ??
Function Key’s
??????
1
Chapter 4
working with jobs
Handling messages
2
A JOB
Consists of a set /group of related (one or many) programs
Receives all of its attributes from one or all
System values, User profile, a job description, inheritance
such as
name, library list, datefmt, queue, output - run priorities,
message logging level, printer.
We use the QDFTJOBD (IBM supplied) as a default job description here at Seneca.
Commands
DSPJOB, WRKJOB, CHGJOB
related commands CRTJOBD, WRKJOBD, CHGJOBD
3
Work with Jobs Command
• To display information about your current
Interactive job, simply type: WRKJOB
• To display information about any other job,
use the Work With Job and enter the Job
Name and User. Sometimes qualification required.
• To display your submitted and still
outstanding Batch Jobs, use the Work with
Submitted Jobs Commands
(WRKSBMJOB) and
Select from the list presented.
4
WRKJOB
Work with Job (WRKJOB)
Type choices, press Enter.
Job name . . . . . . . . . . . .
User . . . . . . . . . . . . .
Number . . . . . . . . . . . .
Output . . . . . . . . . . . . .
Option . . . . . . . . . . . . .
Or use
GO ASSIST
*
*
Name, *
Name
000000-999999
*, *PRINT
*SELECT
*SELECT, *STSA, *DFNA...
and use option 2
5
ASSIST
AS/400 Operational Assistant (TM) Menu
System: ODIN
To select one of the following, type its number below and press Enter:
1. Work with printer output
2. Work with jobs (work with user jobs)
3. Work with messages
4. Send messages
5. Change your password
GO ASSIST
10. Manage your system, users, and devices
11. Customize your system, users, and devices
75. Information and problem handling
80. Temporary sign-off
Type a menu option below
== > 2
F1=Help F3=Exit F9=Command line F12=Cancel
6
SYSTEM
General System Tasks
System: ODIN
Select one of the following:
GO SYSTEM
1. Jobs
(provides a menu related to jobs
2. Status
3. Display system operator messages
4. Messages
5. Files, libraries, and folders
6. Save
7. Restore
8. Device operations
9. Communications
10. Security
60. More system task options
Selection or command
===>
1
F3=Exit F4=Prompt F9=Retrieve F12=Cancel F13=Information Assistant
F16=AS/400 Main menu
(C) COPYRIGHT IBM CORP. 1980, 1999.
7
JOB
Jobs
System: ODIN
Select one of the following:
1. Work with jobs
2. Work with all active job statistics
3. Work with spooled output files
4. Work with printers
5. Work with job queues
6. Work with active subsystems
7. Submit a job
OPTION 1
20. Control job environment
60. More job options
70. Related commands
Selection or command
===> 1
F3=Exit F4=Prompt F9=Retrieve F12=Cancel F13=Information Assistant
F16=AS/400 Main menu
8
Work with Job
Job: QPADEV003X
System: ODIN
User: ABERNS
Number: 404631
Select one of the following:
1. Display job status attributes
2. Display job definition attributes
3. Display job run attributes, if active
4. Work with spooled files
WRKJOB cont’d
Defaults to your current session / job
10. Display job log, if active or on job queue
11. Display call stack, if active
12. Work with locks, if active
13. Display library list, if active
14. Display open files, if active
15. Display file overrides, if active
16. Display commitment control status, if active
More...
Selection or command
===>
9
WRKUSRJOB
• Shows you a list of all of the jobs owned by
the selected user
regardless of the subsystem
• Status
– Active = Job is currently running
– Outq = Job is finished
– Jobq = Job is waiting to process.
• To delete a ‘run-away’ job, take option 4
10
WRKUSRJOB continued
GO ASSIST 10, 12
Work with User Jobs
ODIN
10/15/00 17:47:59
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect
Opt
___
___
___
___
___
___
___
___
___
___
Job
DA234E29
QPADEV000M
QPADEV000Q
QPADEV000W
QPADEV001C
QPADEV001D
QPADEV001F
QPADEV001G
QPADEV001H
QPADEV001K
User
DA234E29
DA444A32
DA444B31
DA400D12
DA540A28
DA444B25
DA234F20
DA234F37
DA400C02
CE544B06
Type
INTER
INTER
INTER
INTER
INTER
INTER
INTER
INTER
INTER
INTER
More...
-----Status----ACTIVE
ACTIVE
ACTIVE
ACTIVE
ACTIVE
ACTIVE
ACTIVE
ACTIVE
ACTIVE
ACTIVE
Function
CMD-STRSEU
CMD-STRSEU
CMD-WRKOBJPDM
CMD-STRSEU
CMD-STRSEU
CMD-STRSEU
CMD-WRKOBJPDM
CMD-WRKLIBPDM
MNU-MAIN
CMD-STRPDM
Parameters or command
===>
F3=Exit
F4=Prompt F5=Refresh F9=Retrieve F11=Display schedule data
F12=Cancel F21=Select assistance level
11
Parameters or command
===> WRKACTJOB
Shows all currently active jobs and the current status
Or redirect to the printer
Parameters or command
===> WRKACTJOB OUTPUT(*PRINT)
12
WRKACTJOB
Work with Active Jobs
F14 Include
ODIN
02/07/01 20:48:54
CPU %: 7.7 Elapsed time: 00:00:27 Active jobs: 191
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect ...
Opt Subsystem/Job
User
Type CPU % Function
___ QCMN
QSYS
SBS
.0
DEQW
___ QCTL
QSYS
SBS
.0
DEQW
___
QSYSSCD
QPGMR
SBS
.0
DEQW
___
QPADEV000D DB344D21 INT
. 0 CMD-STRSEU
___
QPADEV000F DB344D21 INT
.0
CMD-WRKJOB
___
QPADEV000M DB444A11 INT
.0
CMD-STRPDM
___ +QPADEV001C DB344C11 INT
.0
CMD-STRSEU
___
QPADEV001H CE534B03 INT
.0
CMD-STRPDM
Status
DSPW
DSPW
DSPW
DSPW
DSPW
More...
Parameters or command
===>
F3=Exit F5=Refresh
F7=Find
F10=Restart statistics
F11=Display elapsed data F12=Cancel F23=More options F24=More keys
13
WRKACTJOB cont’d
Change Job (CHGJOB)
Option 2 on list screen
Type choices, press Enter.
Job name . . . . . . . . . . . . >
User . . . . . . . . . . . . . >
Number . . . . . . . . . . . . >
Job priority (on JOBQ) . . . . .
Output priority (on OUTQ) . . .
Print device . . . . . . . . . .
Output queue . . . . . . . . . .
Library . . . . . . . . . . .
Run priority . . . . . . . . . .
QPADEV003X Name, *
ABERNS
Name
404631
000000-999999
*SAME
0-9, *SAME
5
1-9, *SAME
PRT01
Name, *SAME, *USRPRF...
ABERNS
Name, *SAME, *USRPRF, *DEV...
ABERNS
Name, *LIBL, *CURLIB
20
1-99, *SAME
Additional Parameters
Job queue . . . . . . . . . . .
Library . . . . . . . . . . .
Print text . . . . . . . . . . .
*SAME
Name, *SAME
Name, *LIBL, *CURLIB
*BLANK
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
14
WRKACTJOB / CHGJOB cont’d 2
Change Job (CHGJOB)
Type choices, press Enter.
Message logging:
Level . . . . . . . . . . . .
4
0-4, *SAME
Severity . . . . . . . . . . .
00
0-99, *SAME
Text . . . . . . . . . . . . .
*NOLIST
*SAME, *MSG, *SECLVL, *NOLIST
Log CL program commands . . . . *NO
*SAME, *YES, *NO
Inquiry message reply . . . . .
*RQD
*SAME, *RQD, *DFT, *SYSRPYL
Break message handling . . . . .
*NORMAL *SAME, *NORMAL, *NOTIFY...
Status message . . . . . . . . .
*NORMAL *SAME, *USRPRF, *SYSVAL...
DDM conversation . . . . . . . .
*KEEP
*SAME, *KEEP, *DROP
Schedule date . . . . . . . . .
*SAME
Date, *SAME, *CURRENT...
Schedule time . . . . . . . . .
*SAME
Time, *SAME, *CURRENT
Job date . . . . . . . . . . . .
020701
Date, *SAME
Date format . . . . . . . . . .
*MDY
*SAME, *SYSVAL, *YMD, *MDY...
Date separator . . . . . . . . . '/'
*SAME,
*SYSVAL, *BLANK, /...
Time separator . . . . . . . . . ':'
*SAME,
*SYSVAL, *BLANK, :...
Job switches . . . . . . . . . .
00000000
Character value, *SAME
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
15
WRKACTJOB / CHGJOB cont’d 3
Change Job (CHGJOB)
Type choices, press Enter.
Time slice . . . . . . . . . . .
1500
Eligible for purge . . . . . . .
*YES
Default wait time . . . . . . .
30
Device recovery action . . . . .
*DSCMSG
Time slice end pool . . . . . .
*NONE
Print key format . . . . . . . .
*PRTHDR
Sort sequence . . . . . . . . .
*HEX
Library . . . . . . . . . . .
Language ID . . . . . . . . . .
ENU
Country ID . . . . . . . . . . .
US
Coded character set ID . . . . .
65535
Job message queue full action . *NOWRAP
Decimal format . . . . . . . . .
*BLANK
Character identifier control . .
*DEVD
Duplicate job option . . . . . .
*SELECT
Milliseconds, *SAME
*SAME, *YES, *NO
Seconds, *SAME, *NOMAX
*SAME, *SYSVAL, *NONE, *BASE
*SAME, *SYSVAL, *NONE...
Name, *SAME, *USRPRF...
Name, *LIBL, *CURLIB
*SAME, *SYSVAL...
*SAME, *SYSVAL...
*SAME, *USRPRF, *SYSVAL...
*SAME, *SYSVAL, *NOWRAP...
*SAME, *SYSVAL, *BLANK, I, J
*SAME, *USRPRF, *SYSVAL...
*SELECT, *MSG
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
16
SBMJOB (executed once only)
Command to run . . . . . . . . . call ar010
.
...
Job name . . . . . . . . . . . .
myjob
Name, *JOBD
Job description . . . . . . . . *USRPRF
Name, *USRPRF
Library . . . . . . . . . . .
Name, *LIBL, CURLIB
Job queue . . . . . . . . . . .
*JOBD
Name, *JOBD
Library . . . . . . . . . . .
Name, *LIBL, CURLIB
Job priority (on JOBQ) . . . *JOBD
1-9, *JOBD
Output priority (on OUTQ) *JOBD
1-9, *JOBD
Print device . . . . . . . . . .
*CURRENT Name, *CURRENT,
*USRPRF...
SBMJOB CMD(CALL PGM(AR010)) JOB(MYJOB) SCDTIME(2330)
17
SBMJOB continued
F10 additional parameters used
+ for more values
Message logging:
Level . . . . . . . . . . . .
*JOBD
Severity . . . . . . . . . . .
*JOBD
0-99, *JOBD
Text . . . . . . . . . . . . .
*JOBD
*JOBD, *MSG, *SECLVL, *NOLIST
Log CL program commands . *JOBD
Inquiry message reply . . . . . *JOBD
Hold on job queue . . . . . . . *JOBD
0-4, *JOBD
*JOBD, *NO, *YES
*JOBD, *RQD, *DFT, *SYSRPYL
*JOBD, *NO, *YES
Schedule date . . . . . . . . .
Schedule time . . . . . . . . .
*CURRENT
2330
Date, *CURRENT, *MONTHSTR...
Time, *CURRENT
Job date . . . . . . . . . . . .
*JOBD
Date, *JOBD, *SYSVAL
18
WRKJOBSCDE (repetitive jobs at regular intervals)
Work with Job Schedule Entries (WRKJOBSCDE)
Type choices, press Enter.
Job name . . . . . . . . . . . . *ALL
Output . . . . . . . . . . . . . *
Name, generic*, *ALL
*, *PRINT
Additional Parameters
Sequence . . . . . . . . . . . .
Scheduled by user . . . . . . .
Submit date . . . . . . . . . .
Job queue . . . . . . . . . . .
Library . . . . . . . . . . .
*JOB
*ALL
*ALL
*ALL
*JOB, *DATETIME, *JOBQ
Name, *ALL
Date, *ALL, *CURRENT
Name, *ALL
Name, *LIBL, *CURLIB
19
WRKJOBSCDE (scheduled JOB’s list)
Work with Job Schedule Entries
ODIN
02/07/01 21:45:14
Type options, press Enter.
2=Change 3=Hold 4=Remove 5=Display details 6=Release
8=Work with last submission 10=Submit immediately
Next
-----Schedule-----Opt Job
Status Date
__ ABASGNMT2 HLD *ALL
__ ABDUL1
SCD *FRI
__ ACKER
SCD *FRI
__ ASNCHK2SLB HLD
*ALL
___ ASSNCHK2SL HLD
*ALL
__ DEBCHK
SCD *ALL
__ DRAGA
SCD
*FRI
Time
Frequency
02:00:00 *WEEKLY
16:00:00 *WEEKLY
20:47:05 *WEEKLY
23:55:00 *WEEKLY
11:49:30 *WEEKLY
16:00:00 *WEEKLY
08:25:54 *WEEKLY
Recovery
Action
*SBMRLS
*SBMRLS
*SBMRLS
*SBMRLS
*SBMRLS
*SBMRLS
*SBMRLS
Submit
Date
02/08/01
02/09/01
02/09/01
02/07/01
02/08/01
02/08/01
02/09/01
More...
Parameters or command
===>
F3=Exit F4=Prompt
F5=Refresh F6=Add F9=Retrieve
F11=Display job queue data F12=Cancel F17=Top F18=Bottom
20
Change Job Schedule Entry (CHGJOBSCDE)
OPTION 2
Type choices, press Enter.
Job name . . . . . . . . . . . . >
Entry number . . . . . . . . . . >
Command to run . . . . . . . . .
Frequency . . . . . . . . . . .
Schedule date, or . . . . . . .
Schedule day . . . . . . . . . .
+ for more values
Schedule time . . . . . . . . .
ABASGNMT2
Name
000066
000001-999999, *ONLY
CALL PGM(AB234MRKA2/ASSNCHK)
*WEEKLY
*NONE
*ALL
'02:00:00'
*SAME, *ONCE, *WEEKLY...
Date, *SAME, *CURRENT...
*SAME, *NONE, *ALL, *MON...
Time, *SAME, *CURRENT
Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display
F24=More keys
21
WRKJOBQ
Work with Job Queue (WRKJOBQ)
Type choices, press Enter.
Job queue . . . . . . . . . . .
Library . . . . . . . . . . .
Output . . . . . . . . . . . . .
or use
GO ASSIST
*ALL
*
Name, generic*, *ALL
Name, *LIBL, *CURLIB, *ALL
*, *PRINT
option 12
22
WRKJOBQ
continued
Work with All Job Queues
Type options, press Enter.
3=Hold 4=Delete 5=Work with 6=Release
8=Work with job schedule entries 14=Clear
Opt
___
___
___
__
Queue
QINTER
QPGMR
QSNADS
QSPL
Library
QGPL
QGPL
QGPL
Jobs
0
0
0
QGPL
0
Subsystem
QINTER
Status
RLS
RLS
RLS
QSPL
RLS
etc. etc
23
some JOB related command
DSPJOBLOG
WRKACTJOB
CHGJOB
DSPJOB
WRKSBSJOB
WRKUSRJOB
SBMJOB
WRKJOBSCDE
ADDJOBSCDE
HLDJOBSCDE
etc.
etc. etc.
24
MESSAGES
Send in BREAK or NOTIFY mode
type
INFO or INQuiry
SEVERITY CODES
00 - 99
00 - informational
10 - warning
20 - error
30 - severe error
40 - Severe error with Abort
50 - Abort job or program
Sent to QSYSOPR only
60 - system status
70 - Device integrety
80 - System Alert
90 - System integrety
and user msgs
99 - Action required
25
WRKMSG or DSPMSG
Work with Messages (WRKMSG)
Type choices, press Enter.
Message queue . . . . . . . . .
Library . . . . . . . . . . .
Output . . . . . . . . . . . . .
*WRKUSR
*
Name, *WRKUSR, *SYSOPR...
Name, *LIBL, *CURLIB
*, *PRINT
Additional Parameters
Message type . . . . . . . . . .
Severity code filter . . . . . .
Assistance level . . . . . . . .
*ALL
0
*PRV
*ALL, *INFO, *INQ, *COPY
0-99, *MSGQ
*PRV, *USRPRF, *BASIC...
26
WRKMSG continued
Display Messages
Queue . . . . . : ABERNS
Library . . . : QUSRSYS
Severity . . . : 00
System: ODIN
Program . . . . : *DSPMSG
Library . . . :
Delivery . . . : *NOTIFY
Type reply (if required), press Enter.
From . . . : CE234B07
10/08/00 20:06:05
this is a test
From . . . : CE234B07
10/08/00 20:07:10
********message ***********************8
Job 067658/ABERNS/QDFTJOBD completed normally on 10/11/00 at 11:23:46.
Job 067660/ABERNS/QDFTJOBD completed normally on 10/11/00 at 11:24:01.
Bottom
F3=Exit
F11=Remove a message
F12=Cancel
F13=Remove all
F16=Remove all except unanswered F24=More keys
27
WRKMSG continued
Additional Message Information
(Using cursor positioning and F1)
Message ID . . . . . . : CPF1240
Severity . . . . . . . : 50
Message type . . . . . : Completion
Date sent . . . . . . : 10/11/00 Time sent . . . . . . : 16:50:09
Message . . . . : Job 070258/ABERNS/ASSNCHK ended abnormally.
Cause . . . . . : Job 070258/ABERNS/ASSNCHK ended abnormally on 10/11/00 at
16:50:09. One of the following occurred:
-- The job was ended (ENDJOB command).
-- The subsystem in which the job was running was ended (ENDSBS command).
-- An error occurred.
Recovery . . . : Display the job log (DSPJOBLOG command) for information
why the job or subsystem ended abnormally. Correct the error and try the
request again.
Bottom
Press Enter to continue.
F3=Exit F6=Print F9=Display message details F12=Cancel
F21=Select assistance level
28
WRKMSG / DSPMSG continued
F22
Display List Details
Message queue . . . . . :
Library . . . . . . . :
Delivery . . . . . . . :
Program . . . . . . . . :
Allow jobs to reply . . :
Severity . . . . . . . :
Allow alerts . . . . . :
CCSID . . . . . . . . . :
Message queue full . . :
Description . . . . . . :
ABERNS
QUSRSYS
*NOTIFY
*DSPMSG
*ALWRPY
0
*NO
65535
*SNDMSG
ABERNS
29
CHGMSGQ
Change Message Queue (CHGMSGQ)
Type choices, press Enter.
Message queue . . . . . . . . .
ABERNS
Library . . . . . . . . . . .
*LIBL
Delivery . . . . . . . . . . . .
*SAME
Severity code filter . . . . .
. *SAME
Text 'description' . . . . . . .
*SAME
Name, generic*, *USRPRF...
Name, *LIBL, *CURLIB...
*SAME, *HOLD, *BREAK...
0-99, *SAME
Additional Parameters
Break handling attributes:
Break handling program . . . .
Library . . . . . . . . . .
Allow other jobs to reply . .
Reset old messages . . . . . . .
Force to auxiliary storage . . .
Allow alerts . . . . . . . . . .
*SAME
*NO
*SAME
*SAME
Name, *SAME, *DSPMSG
Name, *LIBL, *CURLIB
*NOALWRPY, *ALWRPY
*NO, *YES
*SAME, *NO, *YES
*SAME, *NO, *YES
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
30
Some MESSAGE related commands
DSPMSG
RCVMSG
RMVMSG
MONMSG
SNDMSG TO MSG QUEUE’S
SNDBRKMSG TO WORKSTATION MSG Q
(only used in a CL program)
31
Display Job Log (DSPJOBLOG)
Type choices, press Enter.
Job name . . . . . . . . . . . . *_________
User . . . . . . . . . . . . .
__________
Number . . . . . . . . . . . . __________
Name, *
Name
000000-999999
Output . . . . . . . . . . . . .
*, *PRINT, *APIDFN, *OUTFILE
*_________
Display Job Log
System: ODIN
Job . . : QPADEV003X User . . : ABERNS
Number . . . : 404631
6>> DSPJOBLOG
Press Enter to continue.
F3=Exit F5=Refresh F10=Display detailed messages F12=Cancel
F17=Top F18=Bottom
32
DSPJOBLOG F10 / PAGE DOWN
Display All Messages
System: ODIN
Job . . : QPADEV003X User . . : ABERNS
Number . . . : 404631
Error found on DSPMSGF command.
6 > dsperrmsg
Command DSPERRMSG in library *LIBL not found.
Error found on DSPERRMSG command.
6 > DSPMSG
6 > go cmdmsg
9 > DSPMSGD MSGF(QMCHMSG)
Message file QMCHMSG in *LIBL not found.
9 > DSPMSGD
6 > DSPMSGD
6 > DSPMSGD RANGE(*ALL)
6 > sndmsgD RANGE(*ALL)
Command SNDMSGD in library *LIBL not found.
Error found on SNDMSGD command.
More...
Press Enter to continue.
F3=Exit F5=Refresh F12=Cancel F17=Top F18=Bottom
33
Operations Navigator
• Graphical User Interface for AS/400
• Used for:
– Displaying messages
– Displaying Spool files
– Database operations
• To install Operations Navigator on your PC
– go to ACS, Downloads, sign in, AS/400 on the
cd.senecac.on.ca website and retrieve Client
Access / Operations Navigator. Install it and if
you need help they also have answers for you.
34
35
36
Download