Debian Codegraph @

libsrc/st/fsyalphb.mar

raw
1 .TITLE FSY_OPEN
2 ; @(#)fsyalphb.mar 19.1 (ESO-IPG) 02/25/03 13:57:16
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 .PSECT FSYVMSB_1,WRT,NOEXE
38
39 $RMSDEF
40
41 BDFFAB: $FAB FOP=<UFO>, -
42 SHR=<UPI,GET>, -
43 FAC=<GET>, -
44 NAM=BDFNAM
45
46 BDFNAM: $NAM
47
48 .PSECT FSYVMSB_2,EXE
49
50 FSY_OPEN:: .CALL_ENTRY
51
52 ; .WORD ^M<>
53 MOVL 04(AP),BDFFAB+FAB$L_FNA ;addr of NAME string
54 MOVB 08(AP),BDFFAB+FAB$B_FNS ;size of NAME string
55
56 $OPEN FAB=BDFFAB ;attempt to open file
57 BLBC R0,50$ ;goto 50$ if not successful
58
59 MOVL BDFFAB+FAB$L_STV,@12(AP) ;return IOCHAN
60
61 50$: MOVL BDFFAB+FAB$L_STS,@16(AP) ;return STATUS
62
63 RET
64
65 .END
66
67 .TITLE FSY_OPEN