JAMS Reference Manual
Contents Index JAMS Home Support

JAMS Reference Manual


Previous Contents Index


JAMS_SCHCALLUSER

The JAMS_SCHCALLUSER routine is a user-written procedure which is called by the JAMS_SCHEDULE process when events occur.

Format

JAMS_SCHCALLUSER type, context


RETURNS

VMS usage: cond_value
type: longword (unsigned)
access: write only
mechanism: by value

ARGUMENTS

type


VMS usage: type
type: longword (unsigned)
access: read only
mechanism: by reference

Identifies the reason for calling your routine. The type parameter will contain one of the following codes:
JAMS_K_SCHSTART JAMS_SCHEDULE process is starting up.
JAMS_K_SCHSTOP JAMS_SCHEDULE process is stopping.
JAMS_K_JOBSTART A Job is starting to execute.
JAMS_K_JOBEND A Job has completed.

While these are the only possible codes for this release of JAMS, you should code your procedure to ignore unrecognized codes because future versions of JAMS may call your procedure for other reasons, with new codes.

context


VMS usage: context
type: longword (unsigned)
access: read only
mechanism: by reference

This is a context variable which you must use when calling the JAMS_GET_DATA routine.

Description

The JAMS_SCHCALLUSER routine is a user-written procedure. This procedure allows you to gain control when certain events occur. This procedure will be called when the JAMS_SCHEDULE process starts or stops and when a job starts executing and completes.

Your routine can call the JAMS_GET_DATA routine to obtain detailed information concerning the event which triggered the call. This routine must complete relatively quickly because JAMS_SCHEDULE process is stalled until this routine completes.

This routine may be written in any language which adheres to the OpenVMS Common Language Environment. You must link your routine into a sharable image. The sharable image must be named JAMS_SCHCALLUSER.EXE and be located in SYS$SHARE or you must define the logical name JAMS_SCHCALLUSER to point to your sharable image. The JAMS_SCHCALLUSER logical name must be defined /EXECUTIVE and /SYSTEM.

The following commands illustrate how to compile, link and install a JAMS_SCHCALLUSER routine on a VAX.


$ COBOL JAMS_SCHCALLUSER.COB 
$ LINK/EXE=JAMS_SCHCALLUSER.EXE SYS$INPUT/OPTION/SHARE 
JAMS_SCHCALLUSER.OBJ 
UNIVERSAL=JAMS_SCHCALLUSER 
JAMS_EXE:JAMSSHR.EXE/SHARE 
[Ctrl/Z]
$ COPY JAMS_SCHCALLUSER.EXE SYS$COMMON:[SYSLIB] 
$ MCR JAMS_EXE:JAMS_MASTER.EXE STOP SCHEDULE 
$ MCR JAMS_EXE:JAMS_MASTER.EXE START SCHEDULE 

The following commands illustrate how to compile, link and install a JAMS_SCHCALLUSER routine on an Alpha.


$ COBOL JAMS_SCHCALLUSER.COB 
$ LINK/EXE=JAMS_SCHCALLUSER.EXE SYS$INPUT/OPTION/SHARE 
JAMS_SCHCALLUSER.OBJ 
SYMBOL_VECTOR=(JAMS_SCHCALLUSER=PROCEDURE) 
JAMS_EXE:JAMSSHR.EXE/SHARE 
[Ctrl/Z]
$ COPY JAMS_SCHCALLUSER.EXE SYS$COMMON:[SYSLIB] 
$ MCR JAMS_EXE:JAMS_MASTER.EXE STOP SCHEDULE 
$ MCR JAMS_EXE:JAMS_MASTER.EXE START SCHEDULE 

There are examples of JAMS_SCHCALLUSER routines in JAMS_EXAMPLES:.


Previous Next Contents Index
JAMS Copyright © 2000, MVP Systems, Inc. All rights reserved.