Program SUBPRO c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c c Dr. Klaus P. Schneider May 1988 c c This Program tests the TSXLIB Routines: INITSP = initialize a subproc. c ISWESP = switch to an subproc. c ITRYSP = try to ini. a subproc. c c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c ISPN = 1 ! subprocess number 1 IRPN = 0 ! C..... Test to initialize a subprocess CALL INITSP ( ISPN,IRPN,0,'SUBPRO.COM',IRET,IERR ) TYPE *, ' Errorflag : ',IERR TYPE *, ' Function Return : ',IRET C..... Test Error Flag IF ( IERR .EQ. 1 ) then TYPE *,' Job does not have SUBPROCESS privilege' ELSE IF ( IERR .EQ. 2 ) then TYPE *,' the specified subprocess number ist too large ' ELSE IF ( IERR .EQ. 3 ) then TYPE *,' all of the jobs subprocesses are already busy' ELSE IF ( IERR .EQ. 4 ) then TYPE *,' there is insufficient memory availble' ENDIF Pause ' type RETURN to switch to the just created Subprocess ' c..... Switch to our Subprocess Call ISWESP ( ISPN,0,0,0,IRET,IERR ) IF ( IERR .EQ. 1 ) Type *,' Job does not have SUBPROCESS privileges' IF ( IERR .EQ. 6 ) Type *,' Subprocess has not been initiated.' Pause ' try to initialize a Subprocess, type RETURN ' C..... Try to initialize a subprocess INITO = 0 ! specifies return to the primary proces CALL ITRYSP ( ISPN,IRPN,INITO,'SUBPRO.COM',IRET,IERR ) C..... Test Error Flag IF ( IERR .EQ. 1 ) then TYPE *,' Job does not have SUBPROCESS privilege' ELSE IF ( IERR .EQ. 2 ) then TYPE *,' the specified subprocess number ist too large ' ELSE IF ( IERR .EQ. 3 ) then TYPE *,' all of the jobs subprocesses are already busy' ELSE IF ( IERR .EQ. 4 ) then TYPE *,' there is insufficient memory availble' ENDIF STOP END