SUBROUTINE DCLCMD (CML,MOD) C***************************************************************************** C C Description : Module to issue a DCL-command from a FORTRAN program C C Arguments : CML = STRING, containing the command to be issued C MOD = STRING, containing one of the following: C 'WAIT' : Stop issueing task and wait for C completion of the command C (default mode) C 'NOWAIT' : Do not wait for completion C C Author : H.A.M.Fikke C AKZO PHARMA, Oss Holland C dept. SDA C C Version : V1.1 Date : 05-apr-83 C C Module name : DCLCMD.FTN C C Package : RSXLIB C C Compilation/Linking : FOR/F4P/TR:NONE DCLCMD C C Updates : name version C H.A.M.Fikke V1.1 C C description : C Detach terminal if it is attached and attach again if C necessary C C***************************************************************************** BYTE CML(1),MOD(1),HLPSTR(80),IOSB(4),ATT C DIMENSION IESB(8) IDS=0 C ATT=.TRUE. CALL QIO("2000,5,3,,IOSB) CALL WAITFR(3) IF (IOSB(1) .EQ. -7) 2,3,3 C THEN 2 ATT=.FALSE. C ENDIF 3 DO 5 I=1,80 5 HLPSTR(I)=0 CALL SBUILD(HLPSTR,79,'DCL ',CML) ICML=LEN(HLPSTR) CALL SPAWN(RAD50('MCR...'),,,1,,IESB,,HLPSTR,ICML,,,IDS) IF (ISCOMP(MOD,'WAIT') .EQ. 0 .OR. LARG(2) .EQ. 0) 10,20,20 C THEN 10 CALL STOPFR(1) C ENDIF C C Return to calling routine C 20 IF (ATT) 30,40,40 C THEN 30 CALL QIO("1400,5,3) CALL WAITFR(3) C ENDIF 40 RETURN END