| As I recall, the SUBMIT_ON_CLOSE is not a file creation option,
it is only a file access option. Which is to say you cannot 'Set'
a file SUBMIT_ON_CLOSE, oyu can only set an access stream to be
SUBMIT_ON_CLOSE.
-- Barry
|
| CREATE/FDL and CONVERT/FDL take FDL clauses and turn them into
fixed file attributes. You can specify the so called runtime
attributes using FDL but only through calling FDL$CREATE and
they will only be valid for the duration of that open.
Any subsequent open will take it's runtime characteristices
from the FAB or the environment.
In general it makes no sense specifiying runtime characteristics
in an FDL. You need to set up your FAB for that. How exactly to
set up your FAB depends on the Language that you are using, but
most languages EXCEPT COBOL have a USEROPEN. For COBOL, which
I believe is the language you are using, you need a bit a hack.
I almost the right thing for you, but before you use it I strongly
suggest you consider it's maintenance impact and check out the
alternatives like:
- Calling SYS$SNDJBC to submit a job
- Rolling your own FAB & RAB and calling SYS$OPEN...
Here's the hack:
The original reason i made that hack was to set some
special rms option on connect time. What you would
have to change is a way to make the RAB address available
externally. To do this I would declare a global variable
in the macro source and move the RAB address into it on
connect time. In the cobol program you declare the same
variable as external. Then IMMEDIATLY after the OPEN of
any file you can move the rab address into a local variable
reserved for that file. You can now call a subroutine
passing that RAB-address-variable BY VALUE and furhter info.
In the routine you define a RAB layout in the linkage section.
Then set up a keybuffer (or perhaps you can simply use the
key in the record itself?), flag the REGARDSLESS and call
SYS$FIND passing the rab structure by ref.
From the RAB you can follow a pointer to find the FAB
$! CONNECT.MAR, Hein van den Heuvel
$! Create user written connect routine
$CREATE CONNECT.MAR
$RABDEF ;Define RAB Bit's & Bytes
;
; The linker will not resolve internal references to transfer vectors!
; See bottom of page 4-8 in the Linker Reference Manual.
;
.TRANSFER SYS$CONNECT ;Entry for user program
.ENTRY SYS_CONNECT, ^M<> ;Local entry point
MOVL 4(AP), R0 ;MAGIC: get RAB address
;
; Here we could verify that this is the correct RAB by following the back
; pointer to the FAB and then examining the file name. Or by looking into
; a global variable... We won't however.
; Ready to do to the RAB whatever needs to be done now! For example:
;
BISL2 #RAB$M_UIF, RAB$L_ROP(R0) ;Set Update_IF ROP bit in RAB
;
; We could also move the FAB and/or RAB address to a global variable, to be
; picked up and acted upon by the main line code...
; All pointers set? Call in the real SYS$CONNECT.
;
CALLG (AP), G^SYS$CONNECT ;Call real SYS$CONNECT
RET ;Back to normal
.END
$
$MACRO CONNECT.MAR
$LINK/SHARE=SYS$LOGIN:CONNECT.EXE CONNECT
$ASSIGN SYS$LOGIN:CONNECT.EXE CONNECT
$!COPY CONNECT.EXE SYS$LIBRARY:
$!LINK application,SYS$INPUT/OPT
$!CONNECT/SHARE
$!and so on.
Hope this helps,
Hein.
|