!************************************************************************************ !* * !* COPYRIGHT (c) 1994 BY TIER3 SOFTWARE LTD. ALL RIGHTS RESERVED. * !* * !* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY * !* IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF SUCH LICENSE AND WITH THE * !* THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * !* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * !* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * !* TRANSFERRED. * !* * !* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND * !* SHOULD NOT BE CONSTRUED AS A COMMITMENT BY TIER3 SOFTWARE LTD. * !* * !************************************************************************************ $! $! Procedure: BUILD_DEMO $! $! This command procedure builds and installs the DEMO_UARS shareable image $! for the Tier3 DEMO example. After this procedure has been run successfully $! the DEMO application can be registered in the Tier3 configuration file. $! $ SAY := WRITE SYS$OUTPUT $ REQD_PRIVS = "CMKRNL,SYSNAM" $ PREV_PRIVS = F$SETPRV(REQD_PRIVS) $ ON ERROR THEN GOTO FINI $ ON CONTROL_Y THEN GOTO FINI $ IF F$PRIVILEGE(REQD_PRIVS) THEN GOTO BUILD_IT $ SAY "You need (CMKRNL,SYSNAM) privilege to run this command file" $ GOTO FINI $! $BUILD_IT: $! $! Compile the source files. P1 is checked to see wheter debug is required. $ IF P1 .EQS. "Y" .OR. P1 .EQS. "y" $ THEN $ COBOL/LIST/DEBUG/CONDITIONALS=D DEMO_UARS.COB $ LINK_QUAL = "/DEBUG" $ ELSE $ COBOL/LIST DEMO_UARS.COB $ LINK_QUAL = "" $ ENDIF $! $ CREATE QUIDEF.MAR ;+ ; Some of the external references in DEMO_UARS.COB will be unresolved ; at link-time because the linker won't find them in the default system ; libraries. This macro file is needed to resolve those references. ; ; Note: This is not a Tier3 requirement. This file is needed only because ; the DEMO User Access Routines need to talk to the job controller ; and use the persona system services. ;- .TITLE GETQUI External symbols and condition codes $QUIDEF GLOBAL $JBCMSGDEF GLOBAL $IMPDEF GLOBAL PERSONA_CREATE_FLAGS== PERSONA_ASSUME_FLAGS== .END ; $ MACRO QUIDEF.MAR $! $! We'll define the logical name LNK$LIBRARY to point to T3$USER so that $! the Tier3 system service library will be searched automatically. $! $ DEFINE/USER LNK$LIBRARY T3$USER $! $ LINK/SHARE'LINK_QUAL' DEMO_UARS.OBJ,QUIDEF.OBJ,SYS$INPUT/OPTION ! ! Transfer Vectors were not used in the DEMO example so we need to force ! the linker to define the procedure entry masks for our User Action ! Routines as universal symbols. If not, Tier3 won't be able to find them. ! ! There are no EXTERNAL file connectors, database handles or working- ! storage variables defined in the DEMO example, so no PSECT attribute ! modification is required to build this shareable image. ! UNIVERSAL=USER_INIT UNIVERSAL=USER_LOGON UNIVERSAL=USER_RECV UNIVERSAL=USER_LOGOFF UNIVERSAL=USER_FINI UNIVERSAL=USER_INT $! $! Unless the resulting shareable image will be placed in the SYS$SHARE $! directory, a trusted logical name needs to be defined so that Tier3 $! can locate the shareable image at run-time. NB: this requirement is $! *not* enforced for DEBUG images. $! $! SYSNAM privilege is required to define a trusted logical name and $! CMKRNL privilege is required to install the shareable image. $! $ UAR_SPEC = F$PARSE("DEMO_UARS.EXE") - ";" $ DEFINE/SYSTEM/EXEC/NOLOG DEMO_UARS 'UAR_SPEC $! $ INSTALL := $INSTALL/COMMAND $! $! In the following command the /SHARE qualifier is required. The /OPEN $! and /HEADER qualifiers are optional. $! $ IF F$FILE_ATTRIBUTES("DEMO_UARS.EXE","KNOWN") $ THEN INSTALL REPLACE DEMO_UARS/OPEN/HEADER/SHARE $ ELSE INSTALL ADD DEMO_UARS/OPEN/HEADER/SHARE $ ENDIF $! $FINI: $ PREV_PRIVS = F$SETPRV(PREV_PRIVS) $ EXIT $!