DCL vs. VMS System Service Routines It is not always necessary to spawn a subprocess to execute a DCL command from within a program. Often the same result can be achieved much more quickly by using the appropriate system service routines. Below is a list comparing DCL commands with the equivalent VMS operating system provided routines. DCL COMMAND SYSTEM SERVICES -------------------------------------------- = (Assignment Statement) LIB$SET_SYMBOL := (String Assignment) LIB$SET_SYMBOL @ (Execute Procedure) LIB$DO_COMMAND, LIB$SPAWN ACCOUNTING ALLOCATE {device} SYS$ALLOC ANALYZE/CRASH_DUMP ANALYZE/DISK_STRUCTURE ANALYZE/ERROR_LOG ANALYZE/IMAGE ANALYZE/MEDIA ANALYZE/OBJECT ANALYZE/PROCESS_DUMP ANALYZE/RMS_FILE ANALYZE/SYSTEM APPEND ASSIGN SYS$CRELNM ASSIGN/MERGE SYS$SNDJBC ASSIGN/QUEUE SYS$SNDJBC ATTACH LIB$ATTACH BACKUP CANCEL SYS$CANWAK CLOSE SYS$CLOSE (RMS) CONNECT CONTINUE interactive CONVERT CONV$CONVERT (Utility Routines) CONVERT/RECLAIM CONV$RECLAIM (Utility Routines) COPY CREATE SYS$CREATE (RMS) CREATE/DIRECTORY LIB$CREATE_DIR CREATE/FDL FDL$CREATE (Utility Routines) CREATE/NAME_TABLE SYS$CRELNT DEALLOCATE SYS$DALLOC DEASSIGN SYS$DELLNM, LIB$DELETE_LOGICAL DEASSIGN/QUEUE SYS$SNDJBC DEBUG interactive DECK card decks DEFINE SYS$CRELNM, LIB$SET_LOGICAL DEFINE/CHARACTERISTIC SYS$SNDJBC DEFINE/FORM SYS$SNDJBC DEFINE/KEY SMG$DEFINE_KEY, SMG$ADD_KEY_DEF DELETE LIB$DELETE_FILE, SYS$ERASE (RMS), SYS$REMOVE (RMS) DELETE/CHARACTERISTIC SYS$SNDJBC DELETE/ENTRY SYS$SNDJBC DELETE/FORM SYS$SNDJBC DELETE/KEY SMG$DELETE_KEY_ENTRY DELETE/QUEUE SYS$SNDJBC DELETE/SYMBOL LIB$DELETE_SYMBOL DEPOSIT DIFFERENCES DIRECTORY LIB$FIND_FILE, LIB$FILESCAN DISCONNECT DISMOUNT SYS$DISMOU DUMP EDIT/ACL EDIT/EDT EDT$EDIT (Utility Routines) EDIT/FDL FDL$CREATE (Utility Routines) EDIT/SUM EDIT/TECO EDIT/TPU TPU$EDIT (Utility Routines) EOD card decks EOJ card decks EXAMINE EXCHANGE EXIT SYS$EXIT, SYS$FORCEX, LIB$STOP, LIB$SIGNAL, LIB$SIGNAL_TO_RET, LIB$SIGNAL_TO_STOP GOTO program control HELP LIB$xxxx (Library utilities) IF program control INITIALIZE INITIALIZE/QUEUE SYS$SNDJBC INQUIRE LIB$GET_COMMAND, LIB$GET_INPUT JOB Lexical Functions: F$CVSI F$CVTIME SYS$ASCTIM, SYS$BINTIM, SYS$NUMTIM F$CVUI F$DIRECTORY SYS$SETDDIR (RMS) F$EDIT collapse compress lowercase trim STR$TRIM uncomment upcase STR$UPCASE F$ELEMENT F$ENVIROMENT F$EXTRACT STR$LEN_EXTR, STR$POS_EXTR, STR$LEFT, STR$RIGHT F$FAO SYS$FAO, LIB$SYS_FAO, LIB$SYS_FAOL F$FILE_ATTRIBUTES SYS$DISPLAY (RMS) F$GETDVI SYS$GETDVI, LIB$GETDVI F$GETJPI SYS$GETJPI, LIB$GETJPI F$GETQUI SYS$GETQUI, LIB$GETQUI F$GETSYI SYS$GETSYI, LIB$GETSYI F$IDENTIFIER F$INTEGER F$LENGTH F$LOCATE STR$POSITION, STR$FIND_FIRST_SUBSTRING, STR$FIND_FIRST_IN_SET, STR$FIND_FIRST_NOT_IN_SET, LIB$MATCHC, LIB$SCANC, INDEX (FORTRAN) F$LOGICAL SYS$TRNLNM, LIB$SYS_TRNLOG F$MESSAGE SYS$GETMSG, LIB$SYS_GETMSG, SYS$PUTMSG, LIB$SIGNAL F$MODE SYS$GETJPI, LIB$GETJPI F$PARSE SYS$FILESCAN, SYS$PARSE (RMS) F$PID SYS$GETJPI, LIB$GETJPI F$PRIVILEGE SYS$GETJPI, LIB$GETJPI F$PROCESS SYS$GETJPI, LIB$GETJPI F$SEARCH SYS$FILESCAN, SYS$SEARCH (RMS) F$SETPRV SYS$SETPRV F$STRING F$TIME LIB$DATE_TIME, LIB$DAY, LIB$DAY_OF_WEEK TIME (FORTRAN), DATE (FORTRAN) F$TRNLNM SYS$TRNLNM, LIB$SYS_TRNLOG F$TYPE F$USER SYS$GETJPI, LIB$GETJPI F$VERIFY LIBRARY LBR$xxxx (Utility Routines) LINK LOGIN Procedure SYS$CREPRC, LIB$SPAWN, SYS$SYSTEM:LOGINOUT.EXE LOGOUT SYS$EXIT, LIB$STOP MACRO MAIL MERGE MESSAGE MONITOR MOUNT SYS$MOUNT ON set error trap routines OPEN SYS$OPEN (RMS) PASSWORD PATCH PHONE PRINT SYS$SNDJBC PURGE READ SYS$READ (RMS) RECALL RENAME LIB$RENAME_FILE, SYS$RENAME (RMS) REPLY SYS$BRKTHRU REQUEST SYS$SNDOPR RUN LIB$RUN_PROGRAM, LIB$DO_COMMAND, LIB$SPAWN, SYS$CREPRC, LIB$CALLG RUNOFF RUNOFF/CONTENTS RUNOFF/INDEX SEARCH SET ACCOUNTING SYS$SNDJBC ACL SYS$CHANGE_ACL AUDIT BROADCAST CARD_READER CLUSTER/QUORUM COMMAND CONTROL LIB$ENABLE_CTRL, LIB$DISABLE_CTRL DAY DEFAULT SYS$SETDDIR (RMS) DEVICE SYS$QIO DEVICE/ACL DEVICE/SERVED DIRECTORY DIRECTORY/ACL FILE FILE/ACL SYS$CHANGE_ACL HOST HOST/DTE KEY LOGINS MAGTAPE SYS$QIO MESSAGE ON SYS$SETEXV OUTPUT_RATE PASSWORD PRINTER PROCESS /NAME=string SYS$SETPRN /PRIORITY=n SYS$SETPRI /PRIVILEGES=privilege SYS$SETPRV /RESOURCE_WAIT SYS$SETRWM /RESUME SYS$WAKE /SUSPEND SYS$SUSPND /SWAPPING SYS$SETSWM PROMPT PROTECTION PROTECTION/DEFAULT SYS$SETDFPROT (RMS) PROTECTION/DEVICE SYS$QIO QUEUE SYS$SNDJBC QUEUE/ENTRY SYS$SNDJBC RESTART_VALUE used in DCL command procedures only RMS_DEFAULT TERMINAL SYS$QIO TIME SYS$SETIME UIC VERIFY VOLUME SYS$QIO WORKING_SET SYS$ADJWSL SHOW ACCOUNTING SYS$SNDJBC ACL AUDIT BROADCAST CLUSTER SYS$GETSYI CPU SYS$GETSYI DEFAULT SYS$SETDDIR (RMS) DEVICES SYS$GETDVI, LIB$GETDVI DEVICES/SERVED SYS$GETDVI, LIB$GETDVI ERROR KEY SMG$GET_KEY_DEF, SMG$LIST_KEY_DEFS LOGICAL SYS$TRNLNM, LIB$SYS$TRNLOG MAGTAPE SYS$GETDVI, LIB$GETDVI MEMORY NETWORK PRINTER PROCESS SYS$GETJPI, LIB$GETJPI PROTECTION SYS$SETDFPROT (RMS) QUEUE SYS$GETQUI, LIB$GETQUI QUEUE/CHARACTERISTICS SYS$GETQUI, LIB$GETQUI QUEUE/FORM SYS$GETQUI, LIB$GETQUI QUOTA RMS_DEFAULT STATUS SYS$GETJPI SYMBOL LIB$GET_SYMBOL SYSTEM SYS$GETJPI TERMINAL SYS$QIO TIME LIB$DATE_DAY, LIB$DAY, LIB$DAY_OF_WEEK, TIME (FORTRAN), DATE (FORTRAN) TRANSLATION SYS$TRNLNM, LIB$SYS_TRNLOG USERS SYS$GETJPI, LIB$GETJPI WORKING_SET SYS$ADJWSL SORT SOR$xxxx (Utility Routines) SPAWN LIB$SPAWN, SYS$CREPRC START/CPU VAX 782 only START/QUEUE SYS$SNDJBC START/QUEUE/MANAGER SYS$SNDJBC STOP LIB$STOP, SYS$DELPRC, SYS$FORCEX STOP/CPU VAX 782 only STOP/QUEUE SYS$SNDJBC STOP/QUEUE/ABORT SYS$SNDJBC STOP/QUEUE/MANAGER SYS$SNDJBC STOP/QUEUE/NEXT SYS$SNDJBC STOP/QUEUE/REQUEUE SYS$SNDJBC STOP/QUEUE/RESET SYS$SNDJBC SUBMIT SYS$SNDJBC SYNCRONIZE SYS$SYNCH TYPE SYS$OPEN, SYS$READ, SYS$WRITE UNLOCK WAIT LIB$WAIT, SYS$SCHDWK, SYS$WAITFR, SYS$WFLOR, SYS$WFLAND, SYS$SETIMR WRITE SYS$WRITE (RMS)