The DIV access method (like FASTPAM) uses its own parameter list, rather than the TU FCB for passing parameters.
This DIV(I) parameter list includes - among others - the LARGE_FILE operand for the “Open files” function. The default value *FORBIDDEN prevents uncontrolled access to large files. This function is represented in the parameter list in a bit field that is preset with B'0' (equal to *FORBIDDEN).
The presetting with the default value *FORBIDDEN is therefore guaranteed for programs that were compiled in versions earlier than OSD-BC V5.0.
Indicating whether large files are permitted
The DIV macro with the OPEN function indicates whether large files are permitted. At program level, the LARGE_FILE operand controls whether large files are permitted.
The operand is entered in the TFT (Task File Table) and is evaluated when the file is opened using OPEN.
Operation | Operands |
|
|
LARGE_FILE
The LARGE_FILE operand determines whether or not the file size may exceed 32 GB during processing. The operand is entered in the TFT (Task File Table) and is only evaluated when the file is opened using OPEN.
With the form MF=L, only direct specification is permitted.
= *FORBIDDEN
Default setting: The file size may not exceed 32 GB.
= *ALLOWED
The file size may exceed 32 GB.
= adr / (r)
The address of a field that is 1 byte in length and contains the value for LARGE_FILE or the register that contains the value.
Specifying the first block of the data area and the file length
The first block of the file area to be mapped to the virtual address space is specified using the OFFSET operand and the MAP, SAVE, or RESET function. This value is limited depending on the maximum size of a file.
The length of the file area is specified in 4-KB blocks using the SPAN operand and the SAVE or RESET function. This value is limited depending on the maximum size of a file.
Operation | Operands |
|
|
OFFSET
Together with SPAN, OFFSET defines the file region for which the window is created. The OFFSET operand can be specified with the MAP, SAVE or RESET functions.
Default setting:
OFFSET = 0
With the form MF=L, only direct specification is permitted.
= number
Specifies the first block of the file region to be mapped in virtual address space. The value for OFFSET is limited to the maximum size of a file in 4 KB pages minus 1:
0 <=
number <=
8388606 for LARGE_FILE=*FORBIDDEN
0 <=
number <=
1073741823 for LARGE_FILE=*ALLOWED
= adr
Symbolic address of a 4-byte field containing the numeric value (binary) of the specification for the first block of the file region to be mapped in virtual address space.
= *equ
Equate representing the numeric value of the specification for the first block of the file region to be mapped in virtual address space.
The “*” character must precede the name of the equate.
= (r)
Register containing the numeric value of the specification for the first block of the file region to be mapped in virtual address space.
SPAN
Together with OFFSET, SPAN defines the data area which is referred to in SAVE. The SPAN operand can be specified with the SAVE or RESET functions.
Default setting:
SPAN = 0
With the form MF=L, only direct specification is permitted.
= number
Specifies the length of the file region in 4-KB blocks. The value for SPAN is limited by the maximum size of a file in 4 KB pages minus 1:
0 <=
number <=
8388607 for LARGE_FILE=*FORBIDDEN
0 <=
number <=
1073741824 for LARGE_FILE=*ALLOWED
= adr
Symbolic address of a 4-byte field which specifies the length of the file region in 4-KB blocks (binary).
= *equ
Equate which specifies the length of the file area in 4-KB blocks (binary). The “*” character must precede the name of the equate.
= (r)
Register containing the length of the file region in 4-KB blocks (binary).
Additional return codes display information about the execution of the macro with regard to large files:
X'cc' | X'bb' | X'aaaa' | Explanation |
X'00' | X'01' | X'000C' | The value for LARGE_FILE (OPEN) is neither *ALLOWED nor *FORBIDDEN. |
X'00' | X'40' | X'0030' | When a file was accessed in the mode SHARUPD=YES, it was determined that the file size exceeded 32 GB; exceeding 32 GB was not permitted for this file in OPEN. |