Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-08 - 43,50512/rmcsem.bli
There are no other files named rmcsem.bli in the archive.
MODULE RMCSEMANTIC(!RMCOPY SEMANTICS MODULE
		  IDENT = '10'
		  ) =
BEGIN


! COPYRIGHT (C) 1978
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754
!
! THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE
! COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE
! ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPISE THEREOF,
! MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON
! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE
! TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES
! REMAIN IN DEC.
!
! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
! AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT
! CORPORATION.
!
! DEC ASSUMES  NO  RESPONSIBLILTY  FOR  THE USE OR  RELIABILITY OF ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
!
!++
! FACILITY:
!	RMCOPY TRANSPORTABLE CODE
!
! ABSTRACT:
!	This module DOES the SEMANITIC EVALUATION OF THE 
!	
!	OPTION SWITCH DETECTIION AND LEGALLY CHKING.
!	indirect command file REQUESTS,CMD STRING AND node name 
!	checking ARE ALSO DONE IN THIS MODULE.
!
! ENVIRONMENT:
!	TRANSPORTABLE
!
! AUTHOR: JOHN DEROSE, CREATION DATE: FEB 1978
!
! MODIFIED BY:
!
!	01	29-NOV-79  ON NOQSEND, ERROR CALL TO RMC_MSG WITH WRONG
!		ERROR CODE (RMCSNI SHOULD BE RMCSNA) J.D.
!
!--
!

! TABLE OF CONTENTS:
!
FORWARD ROUTINE
	FLE_DEFAULT,		!COMMON DEFAULT ROUTINE
	SRC_DEFAULT,		!SOURCE FILE DEFAULT AND CHK ROUTINE
	DST_DEFAULT,		!DEST. FILE DEFAULT AND CHK ROUTINE
	CMD_DEFAULT,		!INDIRECT CMD FILE DEFAULT AND CHK ROUTINE
	LOG_DEFAULT,		!LOG FILE DEFAULT AND CHK ROUTINE
	GET_ACCESS,		!GET/CHK ACCESS FOR FILE ROUTINE
	RMC_SEMANTIC;

!
! DEFINITION LIBRARY FILES:
!
LIBRARY 'RMCOPY';	!The interface to the system-independent portion
!
! CONDITIONAL COMPILATION:
!
	%IF FTTOPS10 %THEN %INFORM ('RMCOPY FOR TOPS10') %FI
	%IF FTTOPS20 %THEN %INFORM ('RMCOPY FOR TOPS20') %FI
	%IF FTVAX %THEN %INFORM ('RMCOPY FOR VAX') %FI
!
!
! MACROS:
!
!
! EQUATED SYMBOLS:
!
!
! OWN STORAGE:
!
!
! EXTERNAL REFERENCES:
!
EXTERNAL ROUTINE
	RMC_MSG,		!RMC MSG TTY OUTPUT ROUTINE
	FILE_SPEC,		!FILE SPEC INTO BLOCK ROUTINE
	MSGERR,			!Message/error routine
	COPY_SPEC,		!COPY FILE SPECS FOR PTR BLK ROUTINE
	CHK_ACCESS,		!CHECK FILE ACCESS ROUTINE
	ZEROBLK,		!ZERO CORE BLOCK ROUTINE
	CREAT;			!SYSTEM QUEUER INTERFACE ROUTINE


EXTERNAL 
	STRG_1,			!STORAGE AREA 1
	STRG_2,			!STORAGE AREA 2
	STRG_3,			!STORAGE AREA 3
	STRG_4,			!STORAGE AREA 4
	STRG_5,			!STORAGE AREA 5
	LOG_EXT_DEFAULT,	!LOG FILE EXT DEFAULT
	CMD_EXT_DEFAULT,	!CMD FILE EXT DEFAULT
	CMD_NAM_DEFAULT,	!CMD FILE FILE DEFAULT
	SOURCE_FILE$BLK,	!SOURCE FILE DATA BLOCK 
	CHK_BLK,		!CHK ACCESS FILE DATA BLOCK 
	DEV_PATH,		!DEVICE PATH VECTOR
	USER_PATH,		!USER PATH VECTOR
	EVALBLK: VECTOR[EVAL$SIZE],	!EVALUATION PTR/STATUS BLOCK
	SDRMCBLK: VECTOR[SD$SIZE];	!SEND RMC BLOCK
!
!
!


GLOBAL ROUTINE RMC_SEMANTIC=
BEGIN
!++
!
! FUNCTIONAL DESCRIPTION:
!
!	NOTE: SOURCE FILE IS ALWAYS PROCESSED FIRST.   THIS IS TO ASSURE THE
!	DEFAULT PATH FOR DESTINATION FILE SPECS
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--
LOCAL	ERRORWORD;
LOCAL NODEFLAGWORD:BITVECTOR[CHK_NOD$SIZE];
LOCAL FILEPTR:	REF FILE$ARG;
LOCAL	EVALPTR:REF EVAL_BLK,
	SDBKPTR:REF SD_RMCBLK;

FILEPTR=SOURCE_FILE$BLK;

EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;

NODEFLAGWORD=.EVALPTR[EVAL$RNODECHAR];	!SET UP NODE TBL FLG WORD
FLE_DEFAULT();		!SET ALL COMMON FILE DEFAULTS

SELECTONE .SDBKPTR[SD$RMCFUN] OF
SET
[RMC$F_GET]:	BEGIN
		  IF NOT .NODEFLAGWORD[CHK_NOD$QRTV]
		  THEN ERRORWORD=-1	!NO RETREIVE REQUESTS ALLOWED FOR THIS REMOTE
		  ELSE BEGIN
		  SDBKPTR[SD$PTR_RMT]=.EVALPTR[EVAL$RFILESPCPT];
		  SDBKPTR[SD$CNT_RMT]=.EVALPTR[EVAL$RFILESPCCC];
		  IF (ERRORWORD=SRC_DEFAULT(SDBKPTR[SD$PTR_RMT],SDBKPTR[SD$CNT_RMT])) LSS 0
		  THEN RETURN .ERRORWORD;
		  SDBKPTR[SD$CNT_REN]=.EVALPTR[EVAL$LFILESPCCC];
		  SDBKPTR[SD$PTR_REN]=.EVALPTR[EVAL$LFILESPCPT];
		  IF (ERRORWORD=DST_DEFAULT(SDBKPTR[SD$PTR_REN],SDBKPTR[SD$CNT_REN])) LSS 0
		  THEN RETURN .ERRORWORD;
		  END;
		END;
[RMC$F_SEND]:	BEGIN
		  IF NOT.NODEFLAGWORD[CHK_NOD$QSND]
		  THEN ERRORWORD=-1	!NO SEND REQUESTS ALLOWED FOR THIS REMOTE
		  ELSE BEGIN
		  SDBKPTR[SD$CNT_REN]=.EVALPTR[EVAL$RFILESPCCC];
		  SDBKPTR[SD$PTR_REN]=.EVALPTR[EVAL$RFILESPCPT];
		  IF (ERRORWORD=SRC_DEFAULT(SDBKPTR[SD$PTR_REN],SDBKPTR[SD$CNT_REN])) LSS 0
		  THEN RETURN .ERRORWORD;
		  SDBKPTR[SD$PTR_RMT]=.EVALPTR[EVAL$LFILESPCPT];
		  SDBKPTR[SD$CNT_RMT]=.EVALPTR[EVAL$LFILESPCCC];
		  IF (ERRORWORD=DST_DEFAULT(SDBKPTR[SD$PTR_RMT],SDBKPTR[SD$CNT_RMT])) LSS 0
		  THEN RETURN .ERRORWORD;
		  END;
		END;
[RMC$F_DEL]:	BEGIN
		  IF NOT (.NODEFLAGWORD[CHK_NOD$QRTV] OR .NODEFLAGWORD[CHK_NOD$QSND])
		  THEN ERRORWORD=-1	!NO REQUESTS ALLOWED FOR THIS REMOTE
		  ELSE BEGIN
		  SDBKPTR[SD$PTR_RMT]=.EVALPTR[EVAL$LFILESPCPT];
		  SDBKPTR[SD$CNT_RMT]=.EVALPTR[EVAL$LFILESPCCC];
		  IF (ERRORWORD=DST_DEFAULT(SDBKPTR[SD$PTR_RMT],SDBKPTR[SD$CNT_RMT])) LSS 0
		  THEN RETURN .ERRORWORD;
		  END;
		END;
[RMC$F_REN]:	BEGIN
		  IF NOT (.NODEFLAGWORD[CHK_NOD$QRTV] OR .NODEFLAGWORD[CHK_NOD$QSND])
		  THEN ERRORWORD=-1	!NO REQUESTS ALLOWED FOR THIS REMOTE
		  ELSE BEGIN
		  SDBKPTR[SD$CNT_REN]=.EVALPTR[EVAL$RFILESPCCC];
		  SDBKPTR[SD$PTR_REN]=.EVALPTR[EVAL$RFILESPCPT];
		  IF (ERRORWORD=SRC_DEFAULT(SDBKPTR[SD$PTR_REN],SDBKPTR[SD$CNT_REN])) LSS 0
		  THEN RETURN .ERRORWORD;
		  SDBKPTR[SD$PTR_RMT]=.EVALPTR[EVAL$LFILESPCPT];
		  SDBKPTR[SD$CNT_RMT]=.EVALPTR[EVAL$LFILESPCCC];
		  IF (ERRORWORD=DST_DEFAULT(SDBKPTR[SD$PTR_RMT],SDBKPTR[SD$CNT_RMT])) LSS 0
		  THEN RETURN .ERRORWORD;
		  END;
		END
TES;

IF .ERRORWORD LSS 0
THEN
BEGIN
SELECTONE .SDBKPTR[SD$RMCFUN] OF
SET
!CAN'T DO GET REQUEST FOR THAT NODE (NODTABLE)
[RMC$F_GET]:ERRORWORD=RMC_MSG(RMCRNA,S$SEVERE_HOLD);
!CAN'T DO SEND REQUEST FOR THAT NODE (NODTABLE)
[RMC$F_SEND]:ERRORWORD=RMC_MSG(RMCSNA,S$SEVERE_HOLD);
!CAN'T DO GET/SEND REQUEST FOR THAT NODE (NODTABLE)
[RMC$F_DEL]:ERRORWORD=RMC_MSG(RMCRSN,S$SEVERE_HOLD);
!CAN'T DO GET/SEND REQUEST FOR THAT NODE (NODTABLE)
[RMC$F_REN]:ERRORWORD=RMC_MSG(RMCRSN,S$SEVERE_HOLD);
TES;
		!Output actual ascii text string
	MSGERR(.SDBKPTR[SD$PTR_RNOD],S$MSGCRLF);
	RETURN .ERRORWORD
  END;

!DO LOG FILE SET UP IF NOLOG SWITCH IS NOT SPECIFIED
IF NOT .EVALPTR[EVAL$S_NOLOG]
THEN 	BEGIN
	  SDBKPTR[RMC$O_CODE]=1;
	  !ALWAYS SET LOG FILE FUNCTION CODE
	  IF(ERRORWORD=LOG_DEFAULT(SDBKPTR[SD$PTR_LOG],SDBKPTR[SD$CNT_LOG])) LSS 0
	  THEN RETURN .ERRORWORD
	END;

!CHK FOR LOG FILE DSK STRUCTURE SAME AS LOCAL FILE 
!SPEC DSK STRUCTURE -- IF NOT THE SAME BAIL OUT
IF .SDBKPTR[RMC$O_CODE]	!IF LOG FILE
THEN  IF .SDBKPTR[SD$RMCFUN] EQL RMC$F_SEND
   	OR .SDBKPTR[SD$RMCFUN] EQL RMC$F_GET
	THEN BEGIN
		LOCAL LOCDSKPTR,LOCDSKCNT;
		ZEROBLK(SOURCE_FILE$BLK,FILE$SIZE_ARG);
		FILE_SPEC(.SDBKPTR[SD$PTR_REN],.SDBKPTR[SD$CNT_REN],.FILEPTR);
		LOCDSKPTR=.FILEPTR[DSK$PTR];
		LOCDSKCNT=.FILEPTR[DSK$CNT];
		ZEROBLK(SOURCE_FILE$BLK,FILE$SIZE_ARG);
	FILE_SPEC(.SDBKPTR[SD$PTR_LOG],.SDBKPTR[SD$CNT_LOG],.FILEPTR);
	IF CH$FAIL(CH$FIND_SUB(.LOCDSKCNT,.LOCDSKPTR,.FILEPTR[DSK$CNT],.FILEPTR[DSK$PTR]))
		THEN !DSK STRUCTURES ARE NOT THE SAME
		!LOG file's disk structure not the same as local system's
		!send/receive file disk structure
!		RETURN RMC_MSG(RMCLDS,S$SEVERE);
		RMC_MSG(RMCLDS,S$WARN);
	   END;


!Chk remote file spec for dsk structure
!If none found,  output default warning msg
!Also,  remote netspl will use  remote [1,2] search path
ZEROBLK(SOURCE_FILE$BLK,FILE$SIZE_ARG);
FILE_SPEC(.SDBKPTR[SD$PTR_RMT],.SDBKPTR[SD$CNT_RMT],.FILEPTR);
IF .FILEPTR[DSK$CNT] EQL 0
THEN BEGIN
	RMC_MSG(RMCRDN,S$WARN_HOLD);
		!Output actual remote file's text string
	MSGERR(.SDBKPTR[SD$PTR_RMT],S$MSGCRLF)
	END;

IF (ERRORWORD=CREAT(SDRMCBLK)) NEQ 0
THEN
	SELECTONE .ERRORWORD OF
SET
	[CRE$NFP]: RMC_MSG(RMCI29,S$WARN);
	[CRE$ILF]: RMC_MSG(RMCI33,S$WARN);
	[CRE$PERR]: RMC_MSG(RMCI33,S$WARN);
	[CRE$SNR]: RMC_MSG(RMCI33,S$WARN);
	[OTHERWISE]:
TES;
RETURN ZERO

END;


GLOBAL ROUTINE SRC_DEFAULT(SPECPTRADDR,SPECCNTADDR)=
BEGIN
!++
!
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--
LOCAL	ERRORWORD;

LOCAL FILEPTR:	REF FILE$ARG;
LOCAL	EVALPTR: REF EVAL_BLK,
	SDBKPTR: REF SD_RMCBLK;

IF ..SPECCNTADDR EQL 0
		!Source file error
THEN RETURN RMC_MSG(RMCSFE,S$SEVERE);

EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;

FILEPTR=SOURCE_FILE$BLK;
! SET DEFAULT SOURCE FILE PATHS
IF .SDBKPTR[SD$RMCFUN] NEQ RMC$F_SEND
THEN
!IF THE FUNCTION IS OTHER THAN TO SEND A FILE
!MUST CLR SFD PATH
BEGIN
FILEPTR[PPN$PTR]=.EVALPTR[EVAL$USERNUMPTR];
FILEPTR[PPN$CNT]=.EVALPTR[EVAL$USERNUMCNT];
END;

IF (ERRORWORD=GET_ACCESS(.SPECPTRADDR,.SPECCNTADDR,STRG_2,.FILEPTR,SRC$ACCESS))LSS 0 
THEN RETURN .ERRORWORD;

.SPECCNTADDR=COPY_SPEC((.SPECPTRADDR=CH$PTR(STRG_4)),MAX$CMDSIZE/2,SOURCE_FILE$BLK);
!RECONSTRUCTION THE FILEPTR TO POINT INTO THE STRG_4 STRING
!FOR DST DEFAULTS.. STRG_2 MIGHT BE MODIFIED.
FILE_SPEC(..SPECPTRADDR,..SPECCNTADDR,.FILEPTR);
END;


GLOBAL ROUTINE GET_ACCESS(SPECPTRADDR,SPECCNTADDR,STRGEADDR,FILEBLK,TYPEFILE)=
BEGIN
!++
!
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--

LOCAL CHKPTR: REF CHK$ARGBLK;
LOCAL	EVALPTR: REF EVAL_BLK,
	SDBKPTR: REF SD_RMCBLK;
LOCAL FILEPTR:REF FILE$ARG;
LOCAL ERRORWORD;

CHKPTR=CHK_BLK;
EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;
FILEPTR=.FILEBLK;

!MUST ZERO DSK: DEVICE PTR AND CNT
FILEPTR[DSK$PTR]=0;
FILEPTR[DSK$CNT]=0;

FILE_SPEC(..SPECPTRADDR,..SPECCNTADDR,.FILEPTR);

!IF LOG FILE THEN ALWAYS DEFAULT .LOG EXT
!IF .TYPEFILE EQL LOG$ACCESS
!THEN	BEGIN
!	  FILEPTR[EXT$PTR]=CH$PTR(LOG_EXT_DEFAULT);
!	  FILEPTR[EXT$CNT]=.(LOG_EXT_DEFAULT-1)*CHARSPERWORD
!	END;
.SPECCNTADDR=COPY_SPEC((.SPECPTRADDR=CH$PTR(.STRGEADDR)),MAX$CMDSIZE/2,.FILEPTR);
FILE_SPEC(..SPECPTRADDR,..SPECCNTADDR,.FILEPTR);

SELECTONE .TYPEFILE OF
SET
[SRC$ACCESS]:BEGIN IF .SDBKPTR[SD$RMCFUN] EQL RMC$F_SEND
		THEN CHKPTR[CHK$ACCESS$VAL]=(IF .SDBKPTR[RMC$O_DE]
			THEN CHK_AC$RDL ELSE CHK_AC$REA)
			!ON A SEND CHK FILE ACCESS
		ELSE RETURN 0
	     END;
[DST$ACCESS]:BEGIN IF .SDBKPTR[SD$RMCFUN] EQL RMC$F_GET
		THEN CHKPTR[CHK$ACCESS$VAL]=(IF .SDBKPTR[RMC$O_APPD]
			THEN CHK_AC$APN ELSE CHK_AC$WRI)
			!ON A GET CHK FILE ACCESS
		ELSE RETURN 0
	     END;
[LOG$ACCESS]:CHKPTR[CHK$ACCESS$VAL]=CHK_AC$APN;
[CMD$ACCESS]:CHKPTR[CHK$ACCESS$VAL]=CHK_AC$APN
TES;
!SET UP CHK_BLK FOR CHK_ACCESS
CHKPTR[CHK$SPEC$PTR]=..SPECPTRADDR;
CHKPTR[CHK$DEV$PTR]=CH$PTR(DEV_PATH);
CHKPTR[CHK$DEV$CNT]=0;
CHKPTR[CHK$DEV$MAX]=MAX$DEVSIZE;
CHKPTR[CHK$PRO]=0;
CHKPTR[CHK$LIM]=0;
CHKPTR[CHK$PATH$PTR]=CH$PTR(USER_PATH);
CHKPTR[CHK$PATH$MAX]=MAX$PATHSIZE;
CHKPTR[CHK$PATH$CNT]=0;

IF (ERRORWORD=CHK_ACCESS(.CHKPTR)) LSS 0
THEN BEGIN
	LOCAL ERRORCODE,FILECODE;
	 SELECTONE .ERRORWORD OF
SET
	[CHK_AC$NAK]:  ERRORCODE=RMC_MSG(RMCFAN,S$SEVERE_HOLD);
	[CHK_AC$DND]:ERRORCODE=RMC_MSG(RMCDND,S$SEVERE_HOLD);
	[CHK_AC$CCO]:ERRORCODE=RMC_MSG(RMCI22,S$SEVERE_HOLD);
	[CHK_AC$FNF]:ERRORCODE=RMC_MSG(RMCFND,S$SEVERE_HOLD);
	[OTHERWISE]:ERRORCODE=RMC_MSG(RMCI30,S$SEVERE_HOLD)
TES;
	SELECTONE .TYPEFILE OF
SET 
	[SRC$ACCESS]:FILECODE=RMCSOU;
	[DST$ACCESS]:FILECODE=RMCDES;
	[LOG$ACCESS]:FILECODE=RMCLOG;
	[CMD$ACCESS]:FILECODE=RMCCMD;
TES;
	RMC_MSG(.FILECODE,S$MSG);
	!Output actual text string
	MSGERR(..SPECPTRADDR,S$MSGCRLF);
	RETURN .ERRORCODE
    END;

	SELECTONE .TYPEFILE OF
SET 
	[DST$ACCESS]:BEGIN
			!CONVERT SYS: FILE PROTECTION TO DAP IF NOT OPTIONED
		    END;
	[SRC$ACCESS]:BEGIN
			!CONVERT SYS: FILE PROTECTION TO DAP IF NOT OPTIONED
		!IF SOURCE FILE (I.E. SEND FUNCTION) THEN GET
		! FILE SIZE FROM FILE ACCESS
			IF .EVALPTR[EVAL$S_LIMIT]
			THEN IF .SDBKPTR[SD$LIMIT] LSSU .CHKPTR[CHK$LIM]
				THEN
				BEGIN
				!Limit size < file size
!				  RMC_ERROR(RMCSEMINDX,9,S$WARN);
				  SDBKPTR[SD$LIMIT]=.CHKPTR[CHK$LIM]
				END
			    ELSE
			ELSE SDBKPTR[SD$LIMIT]=.CHKPTR[CHK$LIM];
			END;
		TES;
FILEPTR[DSK$PTR]=.CHKPTR[CHK$DEV$PTR];
FILEPTR[DSK$CNT]=.CHKPTR[CHK$DEV$CNT];
FILEPTR[PPN$PTR]=.CHKPTR[CHK$PATH$PTR];
FILEPTR[PPN$CNT]=.CHKPTR[CHK$PATH$CNT];
!	SFD FIELD MUST BE ZEROED BECAUSE CHKPTR[CHK$PATH$PTR]
!	CONTAINS THE SFD WITHIN IT'S TEXT STRING.
FILEPTR[SFD$PTR]=0;
FILEPTR[SFD$CNT]=0;
.SPECCNTADDR=COPY_SPEC((.SPECPTRADDR=CH$PTR(STRG_3)),MAX$CMDSIZE/2,SOURCE_FILE$BLK);
FILE_SPEC(..SPECPTRADDR,..SPECCNTADDR,.FILEPTR);
END;



GLOBAL ROUTINE CMD_DEFAULT(SPECPTRADDR,SPECCNTADDR)=
BEGIN
!++
!
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--
LOCAL	ERRORWORD;

LOCAL FILEPTR:	REF FILE$ARG;
LOCAL	EVALPTR: REF EVAL_BLK,
	SDBKPTR: REF SD_RMCBLK;

EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;

FILEPTR=SOURCE_FILE$BLK;
!SET CMD FILE DEFAULT PATH
FLE_DEFAULT();
FILEPTR[FILE$PTR]=CH$PTR(CMD_NAM_DEFAULT);
FILEPTR[FILE$CNT]=.(CMD_NAM_DEFAULT-1)*CHARSPERWORD;
FILEPTR[EXT$PTR]=CH$PTR(CMD_EXT_DEFAULT);
FILEPTR[EXT$CNT]=.(CMD_EXT_DEFAULT-1)*CHARSPERWORD;

IF (ERRORWORD=GET_ACCESS(.SPECPTRADDR,.SPECCNTADDR,STRG_2,.FILEPTR,CMD$ACCESS))LSS 0 
THEN RETURN .ERRORWORD;
.SPECCNTADDR=COPY_SPEC((.SPECPTRADDR=CH$PTR(STRG_1)),MAX$CMDSIZE/2,SOURCE_FILE$BLK);

END;



GLOBAL ROUTINE FLE_DEFAULT=
BEGIN
!++
!
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--

LOCAL FILEPTR:	REF FILE$ARG;
LOCAL	EVALPTR: REF EVAL_BLK,
	SDBKPTR: REF SD_RMCBLK;

EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;

ZEROBLK(SOURCE_FILE$BLK,FILE$SIZE_ARG);
FILEPTR=SOURCE_FILE$BLK;
END;



GLOBAL ROUTINE LOG_DEFAULT(SPECPTRADDR,SPECCNTADDR)=
BEGIN
!++
!
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--
LOCAL	ERRORWORD;

LOCAL FILEPTR:	REF FILE$ARG;
LOCAL	EVALPTR: REF EVAL_BLK,
	SDBKPTR: REF SD_RMCBLK;

EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;

FILEPTR=SOURCE_FILE$BLK;
!SET LOG FILE DEFAULT PATH
FLE_DEFAULT();
!Set up default log file 
!NOTE: Filename. = filename
!	Filename = filename.default extension
!IF NO LOG FILE WAS SPECIFIED, USE JOBNAME (I.E. DST FILE.NAME)
!.SPECPTRADDR=.SDBKPTR[SD$PTR_JOB];
!.SPECCNTADDR=.SDBKPTR[SD$CNT_JOB];
!Set up fileptr for dst file spec
FILE_SPEC(.SDBKPTR[SD$PTR_JOB],.SDBKPTR[SD$CNT_JOB],.FILEPTR);
!set up default extension
  FILEPTR[EXT$PTR]=CH$PTR(LOG_EXT_DEFAULT);
  FILEPTR[EXT$CNT]=.(LOG_EXT_DEFAULT-1)*CHARSPERWORD;

IF (ERRORWORD=GET_ACCESS(.SPECPTRADDR,.SPECCNTADDR,STRG_5,.FILEPTR,LOG$ACCESS))LSS 0 
THEN RETURN .ERRORWORD;
.SPECCNTADDR=COPY_SPEC((.SPECPTRADDR=CH$PTR(STRG_5)),MAX$CMDSIZE/2,SOURCE_FILE$BLK);

END;





GLOBAL ROUTINE DST_DEFAULT(SPECPTRADDR,SPECCNTADDR)=
BEGIN
!++
!
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--
LOCAL	ERRORWORD;

LOCAL FILEPTR:	REF FILE$ARG;
LOCAL	EVALPTR: REF EVAL_BLK,
	SDBKPTR: REF SD_RMCBLK;

EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;

!SET DESTINATION FILE SPECS DEFAULTS
!USE SOURCE FILE SPECS AS DEFAULT
FILEPTR=SOURCE_FILE$BLK;
SELECTONE .SDBKPTR[SD$RMCFUN] OF
SET
[RMC$F_SEND,RMC$F_DEL]:
BEGIN	!SET LOCAL PPN IF DST IS NOT LOCAL
FILEPTR[PPN$PTR]=.EVALPTR[EVAL$USERNUMPTR];
FILEPTR[PPN$CNT]=.EVALPTR[EVAL$USERNUMCNT];
END;
[RMC$F_GET]:
BEGIN
FILEPTR[PPN$PTR]=0;
FILEPTR[PPN$CNT]=0;
END
TES;
FILEPTR[SFD$PTR]=0;
FILEPTR[SFD$CNT]=0;


IF (ERRORWORD=GET_ACCESS(.SPECPTRADDR,.SPECCNTADDR,STRG_2,.FILEPTR,DST$ACCESS))LSS 0 
THEN RETURN .ERRORWORD;
.SPECCNTADDR=COPY_SPEC((.SPECPTRADDR=CH$PTR(STRG_2)),MAX$CMDSIZE/2,SOURCE_FILE$BLK);
!SET JOB NAME EQUAL TO THE DST FILE NAME
FILE_SPEC(..SPECPTRADDR,..SPECCNTADDR,.FILEPTR);
SDBKPTR[SD$PTR_JOB]=.FILEPTR[FILE$PTR];
SDBKPTR[SD$CNT_JOB]=.FILEPTR[FILE$CNT];

END;









END
ELUDOM