20-Aug-1991 17:04:53 VAX FORTRAN V5.2-33 Page 1 20-Aug-1991 17:04:42 SYS$SYSDEVICE:[MCMICHAEL]MM_LGICMD.FOR;2 0001 PROGRAM MM_LGICMD 0002 C THIS PROGRAM CREATES LOCAL SYMBOLS GIVING THE INFO ABOUT THE JOB RUNNING IT: 0003 C VMS USERNAME (USER) 0004 C LOGIN DEFAULT DEVICE (MM_DEV) 0005 C LOGIN DEFAULT DIRECTORY (MM_DIR) 0006 C AND DEFAULT LOGIN COMMAND PROCEDURE (MM_LOGIN) 0007 IMPLICIT NONE 0008 INCLUDE '($JPIDEF)' ! Job/Process Information Definitions 0150 INCLUDE '($LIBCLIDEF)' ! Command Language Interpreter Definitions 0165 INCLUDE '($UAIDEF)' ! User Authorization Information definitions 0325 CHARACTER*64 LGICMD ! Default login command file name 0326 CHARACTER*64 DEFDIR ! Default login directory name 0327 CHARACTER*32 DEFDEV ! Default login device name 0328 CHARACTER*12 USER ! User name of the process 0329 INTEGER*4 STATUS 0330 INTEGER*4 LIB$SET_SYMBOL! Run-Time Library routine 0331 INTEGER*4 STR$TRIM ! Run-Time Library routine 0332 INTEGER*4 SYS$GETJPIW ! System service 0333 INTEGER*4 SYS$GETUAI ! System service 0334 INTEGER*2 USERLEN 0335 LOGICAL*1 DEFDEVLEN 0336 LOGICAL*1 DEFDIRLEN 0337 LOGICAL*1 LGICMDLEN 0338 0339 EQUIVALENCE (DEFDEVLEN,DEFDEV) ! The first byte 0340 EQUIVALENCE (DEFDIRLEN,DEFDIR) ! of these strings 0341 EQUIVALENCE (LGICMDLEN,LGICMD) ! holds the byte count. 0342 0343 STRUCTURE /ITEM_LIST/ 0344 UNION 0345 MAP 0346 INTEGER*2 LENGTH 0347 INTEGER*2 CODE 0348 INTEGER*4 ADDRESS 0349 INTEGER*4 RETLEN 0350 END MAP 0351 MAP 0352 INTEGER*2 END_LIST 0353 END MAP 0354 END UNION 0355 END STRUCTURE 0356 0357 RECORD /ITEM_LIST/ JPI_ITEMS(2) 0358 RECORD /ITEM_LIST/ UAI_ITEMS(4) 0359 0360 JPI_ITEMS(1).LENGTH = LEN(USER) 0361 JPI_ITEMS(1).CODE = JPI$_USERNAME 0362 JPI_ITEMS(1).ADDRESS = %LOC(USER) 0363 JPI_ITEMS(1).RETLEN = 0 0364 JPI_ITEMS(2).END_LIST = 0 0365 0366 UAI_ITEMS(1).LENGTH = LEN(LGICMD) 0367 UAI_ITEMS(1).CODE = UAI$_LGICMD 0368 UAI_ITEMS(1).ADDRESS = %LOC(LGICMD) 0369 UAI_ITEMS(1).RETLEN = 0 0370 UAI_ITEMS(2).LENGTH = LEN(DEFDEV) 0371 UAI_ITEMS(2).CODE = UAI$_DEFDEV MM_LGICMD 20-Aug-1991 17:04:53 VAX FORTRAN V5.2-33 Page 2 20-Aug-1991 17:04:42 SYS$SYSDEVICE:[MCMICHAEL]MM_LGICMD.FOR;2 0372 UAI_ITEMS(2).ADDRESS = %LOC(DEFDEV) 0373 UAI_ITEMS(2).RETLEN = 0 0374 UAI_ITEMS(3).LENGTH = LEN(DEFDIR) 0375 UAI_ITEMS(3).CODE = UAI$_DEFDIR 0376 UAI_ITEMS(3).ADDRESS = %LOC(DEFDIR) 0377 UAI_ITEMS(3).RETLEN = 0 0378 UAI_ITEMS(4).END_LIST = 0 0379 0380 STATUS = SYS$GETJPIW(,,,JPI_ITEMS,,,) 0381 STATUS = SYS$GETUAI(,,USER,UAI_ITEMS,,,) 0382 STATUS = STR$TRIM(USER,USER,USERLEN) !remove trailing blanks 0383 0384 STATUS = LIB$SET_SYMBOL ('USER', 0385 1 USER(1:USERLEN), 0386 2 LIB$K_CLI_LOCAL_SYM) 0387 STATUS = LIB$SET_SYMBOL ('MM_LOGIN', 0388 1 LGICMD(2:LGICMDLEN+1), 0389 2 LIB$K_CLI_LOCAL_SYM) 0390 STATUS = LIB$SET_SYMBOL ('MM_DIR', 0391 1 DEFDIR(2:DEFDIRLEN+1), 0392 2 LIB$K_CLI_LOCAL_SYM) 0393 STATUS = LIB$SET_SYMBOL ('MM_DEV', 0394 1 DEFDEV(2:DEFDEVLEN+1), 0395 2 LIB$K_CLI_LOCAL_SYM) 0396 CALL EXIT 0397 END PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 295 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 32 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 464 PIC CON REL LCL NOSHR NOEXE RD WRT LONG Total Space Allocated 791 ENTRY POINTS Address Type Name 0-00000000 MM_LGICMD VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name 2-00000080 CHAR DEFDEV 2-00000080 L*1 DEFDEVLEN 2-00000040 CHAR DEFDIR 2-00000040 L*1 DEFDIRLEN 2-00000000 CHAR LGICMD 2-00000000 L*1 LGICMDLEN ** I*4 STATUS 2-000000E8 CHAR USER 2-000000F4 I*2 USERLEN MM_LGICMD 20-Aug-1991 17:04:53 VAX FORTRAN V5.2-33 Page 3 01 20-Aug-1991 17:04:42 SYS$SYSDEVICE:[MCMICHAEL]MM_LGICMD.FOR;2 RECORD ARRAYS Address Name Structure Bytes Dimensions 2-000000A0 JPI_ITEMS ITEM_LIST 24 (2) 2-000000B8 UAI_ITEMS ITEM_LIST 48 (4) FUNCTIONS AND SUBROUTINES REFERENCED Type Name Type Name Type Name FOR$EXIT I*4 LIB$SET_SYMBOL I*4 STR$TRIM I*4 SYS$GETJPIW I*4 SYS$GETUAI COMMAND QUALIFIERS FORTRAN/SHOW=DICTIONARY/LIS MM_LGICMD /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW) /DEBUG=(NOSYMBOLS,TRACEBACK) /SHOW=(DICTIONARY,NOINCLUDE,MAP,NOPREPROCESSOR,SINGLE) /STANDARD=(NOSEMANTIC,NOSOURCE_FORM,NOSYNTAX) /WARNINGS=(NODECLARATIONS,GENERAL,NOULTRIX,NOVAXELN) /CONTINUATIONS=19 /NOCROSS_REFERENCE /NOD_LINES /NOEXTEND_SOURCE /F77 /NOG_FLOATING /I4 /NOMACHINE_CODE /OPTIMIZE /NOPARALLEL /NOANALYSIS_DATA /NODIAGNOSTICS /LIST=SYS$SYSDEVICE:[MCMICHAEL]MM_LGICMD.LIS;1 /OBJECT=SYS$SYSDEVICE:[MCMICHAEL]MM_LGICMD.OBJ;1 COMPILATION STATISTICS Run Time: 4.42 seconds Elapsed Time: 6.56 seconds Page Faults: 793 Dynamic Memory: 731 pages