| 1 |
.TITLE FSY_OPEN |
| 2 |
; @(#)fsyvmsb.mar 19.1 (ESO-IPG) 02/25/03 13:57:17 |
| 3 |
;++ |
| 4 |
; OPEN - Open File |
| 5 |
; |
| 6 |
; This routine is used to open an EXISTING File just for checking |
| 7 |
; its existence |
| 8 |
; The filename, logical or physical, is |
| 9 |
; supplied by the calling program and the file is opened by RMS |
| 10 |
; using the User File Open option. This restricts the access to |
| 11 |
; the file (on the assigned channel) to the QIO and file-mapping |
| 12 |
; system services; no RMS routines can be used. However, the |
| 13 |
; file can still be accessed on another channel for RMS process- |
| 14 |
; -ing, (see FSY_EXTBDF), as it is opened for file sharing. |
| 15 |
; |
| 16 |
; +++ |
| 17 |
; This is the version of MID_OPNBDF for C modules, |
| 18 |
; so character strings are handled more directly. |
| 19 |
; +++ |
| 20 |
; use as FSY_OPEN(NAME,LEN,IOCHAN,STATUS) |
| 21 |
; |
| 22 |
; Input argument: |
| 23 |
; --------------- |
| 24 |
; NAME: CHARACTER expression: Name of Bulk Data File. |
| 25 |
; LEN: I*4 Length of NAME |
| 26 |
; |
| 27 |
; Output arguments: |
| 28 |
; ----------------- |
| 29 |
; IOCHAN: INTEGER variable: I/O channel assigned to file. |
| 30 |
; STATUS: I*4 return status from opening |
| 31 |
; 0 = if not found |
| 32 |
; |
| 33 |
; |
| 34 |
; K. Banse version 1.00 940217 |
| 35 |
;-- |
| 36 |
|
| 37 |
|
| 38 |
$RMSDEF |
| 39 |
|
| 40 |
BDFFAB: $FAB FOP=<UFO>, - |
| 41 |
SHR=<UPI,GET>, - |
| 42 |
FAC=<GET>, - |
| 43 |
NAM=BDFNAM |
| 44 |
|
| 45 |
BDFNAM: $NAM |
| 46 |
|
| 47 |
|
| 48 |
FSY_OPEN:: |
| 49 |
|
| 50 |
.WORD ^M<> |
| 51 |
MOVL 04(AP),BDFFAB+FAB$L_FNA ;addr of NAME string |
| 52 |
MOVB 08(AP),BDFFAB+FAB$B_FNS ;size of NAME string |
| 53 |
|
| 54 |
$OPEN FAB=BDFFAB ;attempt to open file |
| 55 |
BLBC R0,50$ ;goto 50$ if not successful |
| 56 |
|
| 57 |
MOVL BDFFAB+FAB$L_STV,@12(AP) ;return IOCHAN |
| 58 |
|
| 59 |
50$: MOVL BDFFAB+FAB$L_STS,@16(AP) ;return STATUS |
| 60 |
|
| 61 |
RET |
| 62 |
|
| 63 |
.END |
| 64 |
|
| 65 |
.TITLE FSY_OPEN |