.TITLE FSY_OPEN ; @(#)fsyvmsb.mar 17.1.1.1 (ESO-IPG) 01/25/02 17:36:20 ;++ ; OPEN - Open File ; ; This routine is used to open an EXISTING File just for checking ; its existence ; The filename, logical or physical, is ; supplied by the calling program and the file is opened by RMS ; using the User File Open option. This restricts the access to ; the file (on the assigned channel) to the QIO and file-mapping ; system services; no RMS routines can be used. However, the ; file can still be accessed on another channel for RMS process- ; -ing, (see FSY_EXTBDF), as it is opened for file sharing. ; ; +++ ; This is the version of MID_OPNBDF for C modules, ; so character strings are handled more directly. ; +++ ; use as FSY_OPEN(NAME,LEN,IOCHAN,STATUS) ; ; Input argument: ; --------------- ; NAME: CHARACTER expression: Name of Bulk Data File. ; LEN: I*4 Length of NAME ; ; Output arguments: ; ----------------- ; IOCHAN: INTEGER variable: I/O channel assigned to file. ; STATUS: I*4 return status from opening ; 0 = if not found ; ; ; K. Banse version 1.00 940217 ;-- $RMSDEF BDFFAB: $FAB FOP=, - SHR=, - FAC=, - NAM=BDFNAM BDFNAM: $NAM FSY_OPEN:: .WORD ^M<> MOVL 04(AP),BDFFAB+FAB$L_FNA ;addr of NAME string MOVB 08(AP),BDFFAB+FAB$B_FNS ;size of NAME string $OPEN FAB=BDFFAB ;attempt to open file BLBC R0,50$ ;goto 50$ if not successful MOVL BDFFAB+FAB$L_STV,@12(AP) ;return IOCHAN 50$: MOVL BDFFAB+FAB$L_STS,@16(AP) ;return STATUS RET .END .TITLE FSY_OPEN