[Info-vax] Command Procedure Pipe output to a variable

HCorte hmmbcorte at gmail.com
Thu Oct 7 07:18:37 EDT 2021


Thanks for that lexical function to obtain the error message, seems as stated the program is using mailbox so as documented can't use lib$spawn.
https://wiki.vmssoftware.com/SPAWN

As alternative in https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf the use of sys$creprc but have a question that is this routine can run a command procedure instead of a image?

Tried

      PROGRAM CRESUBPROC
      IMPLICIT NONE

C      INCLUDE '($SSDEF)'
C      INCLUDE '(lib$routines)'
C      INCLUDE '($stsdef)'
C      INCLUDE '($IODEF)'
C      INCLUDE '($SYSSRVNAM)'

      INTEGER*4 STAT,pidadr,SYS$CREPRC,SYS$INPUT,SYS$OUTPUT

      STAT = SYS$CREPRC(pidadr,'@script',
     * SYS$INPUT,
     * SYS$OUTPUT,
     * SYS$OUTPUT,,,,,,,)
      PRINT *,'PID Number:',pidadr
      PRINT *,'Status',STAT

      END

that returns 1 as sucess but the command procedure should add a job to lnm$job table that is not happenning
sh log /table=lnm$job.



More information about the Info-vax mailing list