USER WRITTEN PRINT SYMBIONTS ------------------------------- o Users can now write their own output symbionts and have them operate under control of the VMS job controller. VMS SYMBIONTS -------------- Symbionts transfer data between slow and high speed devices in a detached process under the direction of the job controller. o INPUT SYMBIONTS o standard card reader symbiont (SYS$SYSTEM:INPSMB.EXE) o OUTPUT SYMBIONTS o standard print symbiont (SYS$SYSTEM:PRTSMB.EXE) o user modifed symbionts o user written symbionts USER SUPPLIED SYMBIONTS ------------------------- o USER MODIFIED o based on standard print symbiont o one or more routines replaced by user written routines o relatively easy to implement o USER WRITTEN o entirely written by user o message interface to job controller is only VMS supplied piece o much more general capabilities o often complex to implement USER INTERFACE TO JOB QUEUES -------------------------------- +---------------+ ! ! ! ! ! USER ! -- User interactive process, ! ! batch process, or detached process ! ! +---------------+ ! +---------------+ ! ! ! DCL COMMANDS ! -- INITIALIZE, START, SET, SHOW, STOP, ! OR ! PRINT or SUBMIT queue commands, ! USER PROGRAM ! ! ! +---------------+ ! +---------------+ ! ! ! $SNDJBC ! ! SYSTEM ! -- Communicates with job controller ! SERVICE ! through mailboxes ! ! +---------------+ ! +---------------+ ! ! ! JOB ! ! CONTROLLER ! -- Updates queue information and job ! ! information in queue file ! ! +---------------+ ! +---------------+ ! ! ! QUEUE ! -- System wide or VAXcluster wide ! DATA ! shared queue database ! FILE ! ! ! +---------------+ JOB CONTROLLER INTERFACE TO SYMBIONTS ----------------------------------------- The job controller establishes links between queues and symbionts and controls the flow of job steps between them. +---------------+ ! QUEUE FILE ! !---------------! +---------------+ ! ! ! ............!...............!.QUEUE 1 ! ! . ! ! job 1 ! ! . JOB ! ! job 2 ! ! . CONTROLLER! ! ... ! ! . ! ! ! ! . ....!...............!.QUEUE 2 ! +---------------+ ! job 1 ! . . ! job 2 ! . . ! ... ! . . ! ! . . ! QUEUE ... ! . . +---------------+ . .............. . . +---------------+ +---------------+ ! ! ! ! ! ! ! ! ! SYMBIONT 1 ! ! SYMBIONT 2 ! ! ! ! ! ! ! ! ! +---------------+ +---------------+ ! ! ! ! +---------------+ +---------------+ ! ! ! ! ! ! ! ! ! LINE PRINTER 1! ! LINE PRINTER 2! ! ! ! ! ! ! ! ! +---------------+ +---------------+ JOB CONTROLLER INTERFACE TO MULTI-THREADED SYMBOINTS -------------------------------------------------------- The job controller can link several queues to a single "multi-threaded" symbiont. +---------------+ ! QUEUE FILE ! !---------------! +---------------+ ! ! ! ............!...............!.QUEUE 1 ! ! . ! ! job 1 ! ! . JOB ! ! job 2 ! ! . CONTROLLER! ! ... ! ! . ! ! ! ! . ....!...............!.QUEUE 2 ! +---------------+ ! job 1 ! . . ! job 2 ! . . ! ... ! . . ! ! . . ! ... ! . . +---------------+ . . . . +---------------+ ! ! ! ! ! SYMBIONT 1 ! ! ! ! ! +---------------+ ! !................... ! ! +---------------+ +---------------+ ! ! ! ! ! ! ! ! ! LINE PRINTER 1! ! LINE PRINTER 2! ! ! ! ! ! ! ! ! +---------------+ +---------------+ SYMBIONT SERVICES FACILITY ---------------------------- o Provides support of both user modifed and user written symbionts o Shareable image containing SMB and PSM routines (SYS$SHARE:SMBSRVSHR) o Allows upward compatibility for future extensions to the message interface o Referenced and linked similar to RTL routines SMB SERVICES ------------- The SMB services allow users to write their own symbionts that operate under the direction of the VMS job controller. These services: o initialize symbiont environment o establish communications with the job controller o receive messages from the job controller o notify user symbiont of message arrival o send messages to the job controller o provide for multi-threaded environment SMB ROUTINES ------------- The SMB routines available to a user written symbiont are: o SMB$INITIALIZE Initializes the environment and establishes communications with the job controller o SMB$CHECK_FOR_MESSAGE Returns true if a message has been received, false if no messages are waiting o SMB$READ_MESSAGE Reads a message from the job controller into a user supplied buffer o SMB$GET_NEXT_ITEM Breaks a job controller message into individual items. o SMB$SEND_TO_JOBCTL Sends a message to the job controller TYPICAL PROCESSING IN A USER WRITTEN SYMBIONT --------------------------------------------------- o Initialize local data and start symbiont processing by calling SMB$INITIALIZE. o Wait for a "START STREAM" message by calling SMB$READ_MESSAGE. o When received, initialize the output device. o Wait for a "START TASK" message by calling SMB$READ_MESSAGE. o When received, begin processing. o Process the task (print the file). o Notify job controller that task is complete by calling SMB$SEND_TO_JOBCTL. o Wait for another start task command and repeat. If a "STOP STREAM" command is received instead, then release the device and exit the process. PSM SERVICES ------------- The PSM services allow users to modify the way the standard print symbiont works without writing their own symbiont. These services: o Provide the standard symbiont as a callable program o Allow users to replace one or more standard routines with user written routines to: - produce customized separation pages - read the input file - filter input or output records - write to the output device o Allow user modifed symbionts to be multi-threaded o Provide for asynchronous and overlapped read and write operations by user routines o Allow user routines to terminate processing of a task with user specified error messages PSM ROUTINES ------------- The PSM routines used to modify the standard symbiont are: o PSM$REPLACE Specifies a user routine that replaces the routine provided by the standard symbiont. o PSM$PRINT Invokes the standard symbiont and begins processing of job controller messages. o PSM$READ_ITEM_DX Allows a user modifed symbiont to obtain the value of a message item sent by the job controller. o PSM$REPORT Reports the completion of an asychronous IO operation by a user routine to the standard symbiont. USER REPLACEABLE ROUTINES --------------------------- o User can replace standard symbiont routines by calling PSM$REPLACE o Three categories of routines can be replaced - input routines - filter routines - output routine USER REPLACEABLE INPUT ROUTINES ---------------------------------- These input routines provide data for the symbiont to print. In a user modified symbiont one or more of these may be replaced with a user written routine. o JOB SETUP - special pre-job input o JOB FLAG PAGE - flag page that preceeds a job o FILE SETUP - special pre-file input o FILE FLAG PAGE - flag page that preceeds a file o MAIN INPUT - routine to retrieve a print file from the disk o FILE TRAILER - trailer page that follows a file o JOB RESET - special post-job reset sequences o JOB TRAILER - trailer page that follows a job o PAGE HEADER - header lines at top of every page USER REPLACEABLE FILTER ROUTINES ---------------------------------- Filter routines allow a user modified symbiont to access input records before they are formatted, and output blocks before they are printed: o INPUT FILTER o Acts on each record returned by an input routine o Can alter carriage control o OUTPUT FILTER o Acts on blocks of data being sent to the output routine o Can alter blocked data prior to it being printed USER REPLACEABLE OUTPUT ROUTINE --------------------------------- The output routine is responsible for controlling the output device. Replacing this routine allows control of special devices. o OUTPUT ROUTINE o Completely responsible for output device control o allocates and assigns the device o issues QIO's o Can be modifed for plotters, bitmapped devices, or other special hardware USER MODIFIED VS USER WRITTEN -------------------------------------------------------------------- Easy to moderate Can be complex to implement implementation difficulty Upward compatible with May require rework to support future VMS releases new features Can handle simple changes to Can handle general changes to device handling, data filtering, device handling and symbiont or customized separation pages logic flow SUMMARY ------- o User modified symbionts provide a new level of site specific customization and control of queued print jobs o User written symbionts allow special user applications to function under the control of the VMS job controller