Macro type: type S (E form/L form/D form/C form/M form); see "Macro types"
The ACCESS FILE function is implemented in the FPAMACC macro. Accesses to the file referenced by OPENID can be formulated in this macro.
Format
Operation | Operands |
|
|
| |
| |
|
Operand descriptions
BLOCK
Specifies the number of the first logical FASTPAM block (within the file) to be transferred.The block size is determined by the BLKSIZE operand in the OPEN function of the FPAMSRV macro. Only integer values are permitted.
Only a direct specification is allowed for the MF=L form.
= nmbr
Direct entry of a decimal numeric value for the number of the first logical block to be transferred. The value is limited to the maximum size of a file in 4-KB pages minus 1:
1 <= nmbr <= 8388606 for LARGE_FILE=*FORBIDDEN (see the FPAMSRV macro)
1 <= nmbr <= 1073741823 for LARGE_FILE=*ALLOWED (see the FPAMSRV macro)
= addr
Symbolic address of a 4-byte field containing the numeric value (binary).
= (r)
Register containing the numeric value.
CHAIN
Specifies the starting address of another FPAMACC parameter list for which the associated job is to be concatenated to that of the current parameter list. Up to 5000 parameter lists can be chained with each other in this way. All jobs chained in this manner are accepted and executed within an SVC.
The jobs are executed in the order of their concatenation. If a parameter error is encountered in one of the jobs, all other jobs will be rejected with a “CHAIN ERROR” return code. For all other errors, no further job will be processed as of the point at which the error is detected (except for return code FACCPNAC), and all jobs which follow will also be rejected. If asynchronous I/O operations with concatenated “wait parameter lists” are involved, wait operations that have been rejected due to an error must therefore be repeated by the user.
If an error is encountered only after all jobs have been successfully initiated (e.g. an I/O error in a chain of asynchronous read/write operations with eventing), all other jobs will be treated as separate from the job containing the error. Each parameter list must therefore be evaluated independently.
See also the examples on "Error handling for chained parameter lists".
Only the symbolic address is allowed for the MF=L form, but no symbolic names may be used within a DSECT, since its address is not known until runtime.
Note
If eventing is enabled, a signal is sent for each individual job.
= addr
Symbolic address (name) of the next parameter list to be processed.
= (r)
Register containing the starting address of the next parameter list to be processed.
IOAREA
Specifies the 4K-aligned starting address of the I/O buffer, which must lie within the I/O area pool that was specified when calling OPEN.
In the case of data spaces, the ALET indicated at the time of calling ENABLE IOAREA POOL is automatically used.
Only the symbolic address is allowed for the MF=L form, but no symbolic names may be used within a DSECT, since its address is not known until runtime.
= addr
Symbolic address (name) of the area.
= (r)
Register containing the starting address of the I/O buffer.
LEN
Determines the length of data to be transferred in logical blocks. The block size is determined by the BLKSIZE operand of the OPEN function in the FPAMSRV macro. Only integer values between 1 and 8 which do not exceed the MAXIOLN value specified in ENABLE ENVIRONMENT are permitted.
Only a direct specification is allowed for the MF=L form.
= length
Direct entry of a decimal numeric value.
= addr
Symbolic address of a 4-byte field containing the numeric value (binary).
= (r)
Register containing the numeric value.
MACID
Defines the second to the fourth characters (inclusive) of the field names and equates that are generated when macros are resolved.
= ACC
Default value: MACID=ACC
= macid
“macid” is three-character string that defines the second to the fourth character (inclusive) of the generated field names and equates.
MF
The forms of the MF operand are described in detail in the appendix on "Macro types".
OPCODE
Identifies the job type.
Only a direct specification is allowed for the MF=L form.
= *READ
Asynchronous reading of logical blocks. A return value is placed in subcode2, indicating whether the job was executed synchronously or asynchronously. If EVENTNG=*NO was specified in the call to OPEN and if the job was not completed synchronously, it must be terminated with OPCODE=*WAIT; otherwise, all subsequent jobs with this FPAMACC parameter list will be rejected.
= *WRITE
Asynchronous writing of logical blocks. A return value is placed in subcode2, indicating whether the job was performed synchronously or asynchronously. If EVENTNG=*NO was specified in the call to OPEN and if the job was not completed synchronously, it must be terminated with OPCODE=*WAIT; otherwise, all subsequent jobs with this FPAMACC parameter list will be rejected.
= *READ_WAIT
Synchronous reading of logical blocks.
= *WRITE_WAIT
Synchronous writing of logical blocks.
= *READ_EQUALIZE
Synchronously reads logical blocks while simultaneously equalizing the DRV disks in the indicated section within the file. In non-DRV mode, *READ_EQUALIZE has the same effect as *READ_WAIT (for more information on DRV, see the “DRV” manual [15]).
= *WAIT
Waits for the end of an asynchronous job (*READ or *WRITE). This operation may be performed only by the task that has initiated the job.
The WAITLIST parameter is used to specify the address of the FPAMACC parameter list, on whose I/O the wait operation is to be performed. This can also be the same parameter list, but it must lie in the same environment and must contain the same OPENID as the WAIT parameter list.
A *WAIT is illegal in the following cases:
after the synchronous operations *READ_WAIT, *WRITE_WAIT and *READ_EQUALIZE,
if a *WAIT has already been performed,
if the asynchronous job was terminated synchronously (subcode2=FACCSYTE after *READ/*WRITE).
When EVENTNG=*YES was specified in the OPEN
= addr
Symbolic address of a 1-byte field containing the value for OPCODE.
= (r)
Register containing the value for OPCODE.
OPENID
Specifies the short ID of the OPEN for which the FPAMACC operation is to be executed.After successful completion of the OPEN operation, the short ID must be transferred from the FPAMSRV parameter list into the FPAMACC parameter list.
Only a direct specification is allowed for the MF=L form.
= nmbr
Direct entry of a decimal numeric value for the OPEN short ID.
= addr
Address of a 4-byte field containing the short ID.
= (r)
Register containing the short ID.
PARAM
Indicates the address of the operand list. This operand is only evaluated in conjunction with MF=E (see also "Macro types").
POSTCD
Contains data accompanying the bourse signal. This parameter is interpreted only if EVENTNG=*YES is specified.
Only a direct specification is allowed for the MF=L form.
= addr
Address of a 2-byte field containing the POSTCD.
= (r)
Register containing the POSTCD (least-significant 2 bytes).
PREFIX
Defines the first character of field names and equates that are generated when macros are resolved.
= F
Default value: PREFIX=F
= pre
“pre” is a one-character prefix with which the generated field names and equates are to begin.
WAITLST
Specifies the start address of the FPAMACC parameter list, on whose I/O the WAIT operation is to be performed. This may also be the same parameter list, but it must lie in the same environment and must contain the same OPENID.
Any error is reported in the parameter list with which the invalid operation was initiated. In the event of an I/O error, for example, the “wait parameter list” receives the return code “SUCCESSFUL_PROCESSING”; the read/write parameter list, the return code “IO_ERROR”.
WAITLIST is only evaluated in conjunction with OPCODE=*WAIT.
Only the symbolic address is allowed for the MF=L form, but no symbolic names may be used within a DSECT, since its address is not known until runtime.
= addr
Symbolic address (name) of the area.
= (r)
Register containing the starting address of the FPAMACC parameter list.
Programming notes
DRV status
The DRV status is returned when changes are made to the FACCDS field. It is available following the first I/O operation.
End of job message with EVENTING
When the eventing mechanism is used (OPEN with operand EVENTNG=*YES), FASTPAM reports the end of a job in the FACCREQ field of the FPAMACC parameter list. There are two cases:
FACCREQ = X'00' = FACCTERM means 'job terminated'.
FACCREQ = X'FF' = FACCACTV means 'job not yet terminated'.
The FACCREQ field is assigned the value FACCACTV (job active) when the job is accepted and the value FACCTERM at the end of the I/O operation; in the latter case, asynchronously by a system task. For this reason, the contents of the FACCREQ field must not be queried by an assembly language instruction that writes to the field contents. The end-of-job message would be lost, for example, if the field contents were queried with the following
instruction: | OC FACCREQ,FACCREQ |
The instruction: | CLI FACCREQ,0 by contrast, would present no problem. |
Important note
The FACCREQ field must not be accessed by a machine-language instruction for writing between the time the job is submitted and the end-of-job message. All returned information (return code, DRV status) must be evaluated only after the end-of-job message has been independently queried. It would be incorrect, for example, to copy the contents of the FPAMACC parameter list to a different memory location and to perform the desired actions on this copy.
The job could have been completed synchronously or asynchronously when the application program regains control. The user can obtain information on whether or not the system has sent a signal to the bourse from subcode2; however, this cannot be checked until end-of-job has been reported. In any case, this is irrelevant if the user has enabled EVENT DROPPING.
Synchronous jobs will have always completed when the application program regains control; however, the FACCREQ field is still assigned the appropriate value.
Example: End-of-job handling with eventing
*---------------------------------------------------------------------* * The event ID, FASTPAM environment and the I/O area pool should * * have been created by now and the file should have been opened * * with EVENTNG=*YES. * *---------------------------------------------------------------------* FPAMACC MF=M,OPCODE=*READ,.... FPAMACC MF=E,... CLI FACCREQ,FACCTERM Job already terminated? BE TERM *---------------------------------------------------------------------* * Job is not yet terminated; * * do something else * *---------------------------------------------------------------------* : : *---------------------------------------------------------------------* * Wait with SOLSIG (job not synchronously terminated!) * *---------------------------------------------------------------------* B SOLS TERM CLI FACCSR2,FACCSYTE *---------------------------------------------------------------------* * Job synchronously terminated * * no SOLSIG!! * *---------------------------------------------------------------------* BE PROCEED SOLS SOLSIG ... PROCEED EQU * : :
Error handling for chained parameter lists
If FASTPAM detects an error when processing a job chain (possibly when checking parameters or when subsequently processing individual jobs), all following jobs in the chain are rejected by FASTPAM with the return code “CHAIN_ERROR”. The return code “FACCPNAC” (WAIT for an inactive I/O path) is not considered an error in this case, since it occurs normally in a correctly executed program run for synchronously terminated I/Os (with caching). Consequently, “FACCPNAC” does not cause the chain to be aborted, and this in turn simplifies error checking.
When synchronous jobs are chained, only the return code of the last member in the chain needs to be checked in order to ensure that all jobs have executed successfully.
For chains of asynchronous I/Os with attached WAIT jobs, only the return code of the last WAIT job and that of the associated I/O needs to be checked. If both are “SUCCESSFUL”, it can be assumed that all previously completed jobs have also executed successfully.
In the case of chains of asynchronous I/Os with eventing, however, all return codes must be queried separately, since the end-of-job conditions occur independently of one another.
Return codes
Return codes are valid only after the completion of each respective job. They are placed in the (standard) header of the parameter list (see"Layout of the parameter list"):
The main return code, in a half-word with the name FACCMRET.
Subcode1, in one byte with the name FACCSR1.
Subcode1 describes error classes which allow the caller to respond to them. The caller can refer back to the main code as well as to subcode1. (It is better to refer to subcode1, since the information therein does not depend on the software version.)Subcode2, in one byte with the name FACCSR2.
Subcode2 describes the individual main codes more precisely. In the FPAMACC macro, subcode2 is only significant for asynchronous jobs. It indicates whether the job was terminated synchronously for each return code, even in the case of errors.
The field names and the EQU instructions for return codes which are generated by the C or D form of the macro begin with the string FPAM by default. This string can be changed by means of PREFIX and MACID.
Further return codes, whose meanings are defined by conventions valid for all macros, can be found in the table on "Standard header" (standard header).
If the return codes cannot be placed in the header (because it it not accessible, for example), the calling program is terminated with an error message. If the user has defined an STXIT event for an “unrecoverable program error”, this STXIT is activated.
The calling program is terminated if one of the following errors occurs with respect to the parameter list:
the list is not assigned to the caller
the list is not aligned on a word boundary
the list is write-protected.
In the following section, the main return codes are grouped with corresponding subcode1 classes and are described more precisely by subcode2.
Notes
Error flags are listed in the corresponding system messages with the message code DFPaaaa (where aaaa=main code). Message texts can be output using the command or standard statement HELP-MSG-INFORMATION.
All addresses passed to FASTPAM must be valid 31-bit addresses. In particular, bit 32 must not be set, otherwise it will be regarded as belonging to the address.
Standard header: ccbbaaaa
The following code relating to execution of the FPAMACC macro is returned in the standard header (cc = SUBCODE2, bb = SUBCODE1, aaaa = MAINCODE):
X'cc' | X'bb' | X'aaaa' | Meaning |
X'00' | Synchronous termination. | ||
X'01' | Asynchronous termination. | ||
X'00' | X'0000' | Function executed successfully. | |
X'01' | The function could not be executed, since the corresponding operand was not specified correctly. | ||
X'01' | X'00C8' | Function not executed. | |
X'01' | X'00C9' | Function not executed. | |
X'01' | X'00CA' | Function not executed. | |
X'01' | X'00CB' | Function not executed. | |
X'01' | X'00CE' | Function not executed. | |
X'01' | X'00CF' | Function not executed. | |
X'02' | Function not executed. | ||
X'03' | Function not executed. | ||
X'20' | Internal error. | ||
X'20' | X'0028' | Function not executed. | |
X'40' | CORRECT AND RETRY | ||
X'40' | X'0037' | System resource bottleneck. | |
X'40' | X'00C7' | Invalid CFID specified. | |
X'40' | X'012C' | I/O error. | |
X'40' | X'012D' | Another I/O is active on this path. | |
X'40' | X'012E' | Only for OPCODE=*WAIT: | |
X'40' | X'012F' | The job was not executed, since an error occurred in another job chained to it. | |
X'40' | X'0133' | OPCODE=*WAIT is not allowed with EVENTNG=*YES. | |
X'40' | X'0134' | Waiting for an I/O of another task is not permitted. | |
X'40' | X'0140' | I/O after end-of-file. | |
X'40' | X'0141' | No space could be allocated on disk when making a secondary allocation. | |
X'40' | X'0142' | User ID overloaded. | |
X'40' | X'0143' | PVS not attached. | |
X'40' | X'0144' | No new files can be added to the catalog. | |
X'40' | X'0145' | On file access in mode SHARUPD=YES, it was detected that the file size exceeded the value 32 GB even though this value may not be exceeded when OPEN is used with this file. | |
X'40' | X'014A' | No secondary allocation could be made due to a missing extent list. |
Examples
Example 1: Detection of errors during the parameter check
In the following example, before the first job in a chain is processed, FASTPAM checks the parameters of all members in the chain and detects the parameter error “INVALID_<parameter>” in the process.
The boxes illustrated in the diagrams below represent FPAMACC parameter lists. The return codes output in each case are shown below the boxes.
Figure 8: FPAMACC macro: errors during parameter checking
Example 2: Detection of errors after the parameter check
Asynchronous I/Os with eventing:
If an error occurs in a chain of asynchronous I/Os with eventing after all I/Os have been initiated (e.g. an “IO_ERROR”), each job is handled separately. A “CHAIN_ERROR” cannot occur.Since each I/O is on a file that is opened with “eventing”, reads and writes may be freely exchanged:
Figure 9: FPAMACC macro: errors after parameter checking (asynchronous I/O with eventing)
Asynchronous I/Os with “WAIT”:
If, in a chain of asynchronous I/Os with concatenated WAIT operations, an error occurs at the n-th I/O (“IO_ERROR”), the associated WAIT operation in which the error was detected will still be considered successful; however, since processing is aborted after the error, all following WAIT operations for the outputs 1 to (n-1) will be missing.Figure 10: FPAMACC macro: errors after parameter checking (asynchronous I/O with WAIT)
Layout of the parameter list
The following parameter list is issued by an FPAMACC macro:
FPAMACC MF=D 1 STACK PRINT 1 PRINT NOGEN 2 *,##### PREFIX=F, MACID=ACC ##### 1 #INTF REFTYPE=REQUEST,INTNAME=FPAMACC,INTCOMP=001 1 FACCPA DS 0F BEGIN of PARAMETERAREA _INOUT 1 FHDR MF=(C,FACC),EQUATES=YES 2 DS 0A 2 FACCFHE DS 0XL8 0 GENERAL PARAMETER AREA HEADER 2 * 2 FACCIFID DS 0A 0 INTERFACE IDENTIFIER 2 FACCFCTU DS AL2 0 FUNCTION UNIT NUMBER 2 * BIT 15 HEADER FLAG BIT, 2 * MUST BE RESET UNTIL FURTHER NOTICE 2 * BIT 14-12 UNUSED, MUST BE RESET 2 * BIT 11-0 REAL FUNCTION UNIT NUMBER 2 FACCFCT DS AL1 2 FUNCTION NUMBER 2 FACCFCTV DS AL1 3 FUNCTION INTERFACE VERSION NUMBER 2 * 2 FACCRET DS 0A 4 GENERAL RETURN CODE 2 * 2 * GENERAL_RETURN_CODE CLEARED (X'00000000') MEANS 2 * REQUEST SUCCESSFUL PROCESSED AND NO ADDITIONAL INFORMATION 2 * 2 FACCSRET DS 0AL2 4 SUB RETURN CODE 2 FACCSR2 DS AL1 4 SUB RETURN CODE 2 2 * ALWAYS CLEARED (X'00') IF MAIN_RETURN_CODE IS X'FFFF' 2 * Standard subcode2 values as defined by convention: 2 FACCR2OK EQU X'00' All correct, no additional info 2 FACCR2NA EQU X'01' Successful, no action was necessary 2 FACCR2WA EQU X'02' Warning, particular situation 2 FACCSR1 DS AL1 5 SUB RETURN CODE 1 2 * 2 * GENERAL INDICATION OF ERROR CLASSES 2 * 2 * CLASS A X'00' FUNCTION WAS SUCCESSFULLY PROCESSED 2 * CLASS B X'01' - X'1F' PARAMETER SYNTAX ERROR 2 * CLASS C X'20' INTERNAL ERROR IN CALLED FUNCTION 2 * CLASS D X'40' - X'7F' NO CLASS SPECIFIC REACTION POSSIBLE 2 * CLASS E X'80' - X'82' WAIT AND RETRY 2 * 2 FACCRFSP EQU X'00' FUNCTION SUCCESSFULLY PROCESSED 2 FACCRPER EQU X'01' PARAMETER SYNTAX ERROR 2 * 3 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'01' - X'1F' 2 FACCRFNS EQU X'01' CALLED FUNCTION NOT SUPPORTED 2 FACCRFNA EQU X'02' CALLED FUNCTION NOT AVAILABLE 2 FACCRVNA EQU X'03' INTERFACE VERSION NOT SUPPORTED 2 * 2 FACCRAER EQU X'04' ALIGNMENT ERROR 2 FACCRIER EQU X'20' INTERNAL ERROR 2 FACCRCAR EQU X'40' CORRECT AND RETRY 2 * 2 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'40' - X'7F' 2 FACCRECR EQU X'41' SUBSYSTEM (SS) MUST BE CREATED 2 * EXPLICITELY BY CREATE-SS 2 FACCRECN EQU X'42' SS MUST BE EXPLICITELY CONNECTED 2 * 2 FACCRWAR EQU X'80' WAIT FOR A SHORT TIME AND RETRY 2 FACCRWLR EQU X'81' " LONG " 2 FACCRWUR EQU X'82' WAIT TIME IS UNCALCULABLY LONG 2 * BUT RETRY IS POSSIBLE 2 * 2 GLOBALLY DEFINED ISL ERROR CODES IN CLASS X'80' - X'82' 2 FACCRTNA EQU X'81' SS TEMPORARILY NOT AVAILABLE 2 FACCRDH EQU X'82' SS IN DELETE / HOLD 2 * 2 FACCMRET DS 0AL2 6 MAIN RETURN CODE 2 FACCMR2 DS AL1 6 MAIN RETURN CODE 2 2 FACCMR1 DS AL1 7 MAIN RETURN CODE 1 2 * 2 * SPECIAL LAYOUT OF LINKAGE_MAIN_RETURN_CODE (YYYY IN X'00XXYYYY') 2 * 2 FACCRLNK EQU X'FFFF' LINKAGE ERROR / REQ. NOT PROCESSED 2 FACCFHL EQU 8 8 GENERAL OPERAND LIST HEADER LENGTH 2 * 1 * 1 * MAINCODE 1 * 1 FACCMFSP EQU X'0000' SUCCESSFUL_PROCESSING = 0 1 FACCMIER EQU X'0028' INTERNAL_ERROR = 40 1 FACCSRES EQU X'0037' SHORTAGE_OF_RESOURCES = 55 1 FACCICFI EQU X'00C7' INVALID_CFID = 199 1 FACCIOPI EQU X'00C8' INVALID_OPEN_ID = 200 1 FACCIIOA EQU X'00C9' INVALID ADDRESS OF IOAREA = 201 1 FACCIBLK EQU X'00CA' INVALID_BLOCK = 202 1 FACCILAW EQU X'00CB' INVALID LIST ADDRESS FOR WAIT = 203 1 FACCIBL# EQU X'00CE' INVALID_BLOCK_# = 206 1 FACCIOP EQU X'00CF' INVALID_OPCODE = 207 1 FACCIOER EQU X'012C' IO_ERROR = 300 1 FACCPACT EQU X'012D' PATH_ACTIVE = 301 1 FACCPNAC EQU X'012E' PATH_NOT_ACTIVE (WAIT ONLY) = 302 1 FACCCHE EQU X'012F' CHAIN_ERROR = 303 1 FACCWTEV EQU X'0133' WAIT_AND_EVENTING = 307 1 FACCWTNS EQU X'0134' WAIT_NOT_BY_SAME_TASK = 308 1 FACCEOF EQU X'0140' END_OF_FILE = 320 1 FACCNDSA EQU X'0141' NO_DISC_SPACE_AVAILABLE = 321 1 FACCUIDE EQU X'0142' USER_ID_EXHAUSTED = 322 1 FACCPVNA EQU X'0143' PUBLIC_VOLUME_NOT_ATTACHED = 323 1 FACCCEFL EQU X'0144' CATALOG_ENTRY_FULL = 324 1 FACCLFNS EQU X'0145' LARGE_FILE_NOT_SPECIFIED = 325 1 FACCSAVY EQU X'014A' SYSTEM_ADMINISTRATOR_VERIFY = 330 1 * 1 * SUB RETURN CODE2 1 * 1 FACCSYTE EQU X'00' SYNCHRONEOUS TERMINATION 1 FACCASTE EQU X'01' ASYNCHRONEOUS TERMINATION 1 * 1 * FPAMACC FUNCTIONS: 1 * 1 FACCACCF EQU 7 ACCESS FILE 1 * 1 * OUTPUT PARAMETER 1 * 1 DS XL2 RESERVED 1 FACCDS DS X DRV STATUS 1 FACCREQ DS X REQUEST STATUS 1 FACCTERM EQU X'00' REQUEST TERMINATED 1 FACCACTV EQU X'FF' REQUEST ACTIVE 1 * 1 * INPUT PARAMETER 1 * 1 FACCOPID DS F OPEN-ID 1 FACCIOA DS A ADDRESS OF IOAREA 1 FACCBLK DS F BLOCK WITHIN FILE 1 FACCLAW DS A LIST ADDRESS FOR WAIT OPERATION 1 FACCCHLA DS A ADDRESS OF CHAINED LIST 1 FACCPOCO DS FL2 POSTCODE 1 FACCBLK# DS FL1 BLOCK NUMBER 1 FACCOP DS AL1 OPCODE 1 FACCREAD EQU 1 READ 1 FACCWRIT EQU 2 WRITE 1 FACCRDWT EQU 3 READ AND WAIT 1 FACCWRWT EQU 4 WRITE AND WAIT 1 FACCRDEQ EQU 5 READ AND EQUALIZE 1 FACCWAIT EQU 6 WAIT 1 DS 0F 1 FACC# EQU *-FACCPA LENGTH of PARAMETERAREA
Example
Creating a file with FASTPAM
FPAMTEST START BALR 10,0 USING *,10 USING FPAMD,9 LA 9,FPAMPL R9 -> FPAMSRV-Parameterliste *---------------------------------------------------------------------* * Speicher für die ACCESS-Parameterlisten * *---------------------------------------------------------------------* REQM LTR 15,15 BNZ ERROR LR 8,1 R8 -> FPAMACC-Parameterliste *---------------------------------------------------------------------* * Speicher für den IOAREA-POOL * *---------------------------------------------------------------------* REQM 30 LTR 15,15 BNZ ERROR LR 7,1 R7 -> IOAREA-POOL *---------------------------------------------------------------------* * ENABLE ENVIRONMENT * *---------------------------------------------------------------------* FPAMSRV MF=M,PARAM=FPAMPL,ACCLSTS=(8) FPAMSRV MF=E,PARAM=FPAMPL CLI FPAMSR1,FPAMRFSP BE ENAIPO CLI FPAMSR1,FPAMRCAR BNE ERROR CLC FPAMMRET,=Y(FPAMNORE) BNE ERROR *---------------------------------------------------------------------* * Behandlung des Fehlers 'RESIDENT SPACE NOT AVAILABLE' * * evt. nur Meldung ausgeben und weitermachen * *---------------------------------------------------------------------* * . * . * . *---------------------------------------------------------------------* * ENABLE IOAREA-POOL * *---------------------------------------------------------------------* ENAIPO FPAMSRV MF=M,PARAM=FPAMPL,FCT=*ENAIPO,IPONAME='IOAREA', - IPOADDR=((7),0),IPOSIZE=30 FPAMSRV MF=E,PARAM=FPAMPL CLI FPAMSR1,FPAMRFSP BE OPEN CLI FPAMSR1,FPAMRCAR BNE ERROR CLC FPAMMRET,=Y(FPAMNORE) BNE ERROR *---------------------------------------------------------------------* * Behandlung des Fehlers 'RESIDENT SPACE NOT AVAILABLE' * * evt. nur Meldung ausgeben und weitermachen *---------------------------------------------------------------------* * . * . * . *---------------------------------------------------------------------* * Eröffnen der Datei mit OUTIN * *---------------------------------------------------------------------* OPEN FPAMSRV MF=M,PARAM=FPAMPL,FCT=*OPEN,FILE='TESTFILE', - MODE=*OUTIN,SHARUPD=*YES,BLKSIZE=1 FPAMSRV MF=E,PARAM=FPAMPL CLI FPAMSR1,FPAMRFSP BNE ERROR *---------------------------------------------------------------------* * Schreibe nummerierte Blöcke in die Datei * *---------------------------------------------------------------------* LA 6,1 LR 4,8 R4 -> 1. Parameterliste USING ACCESSD,4 LR 3,8 R3 -> 1. Parameterliste LA 2,30 Schleifenzähler CYCL1 DS 0F ST 6,0(7) MVC 0(FACC#,4),FACCPL C 2,=A(1) BNE NOTLAST * IN DER LETZTEN FPAMACC-PARAMETERLISTE KEINE KETTUNG MEHR L 3,FFFFFFFF B NEXT NOTLAST EQU * A 3,=A(FACC#) R3 -> nächste Parameterliste NEXT EQU * FPAMACC MF=M,PARAM=(4),OPENID=FPAMOPID,BLOCK=(6), - IOAREA=(7),CHAIN=(3) A 6,=A(1) LR 4,3 R4 -> nächste Parameterliste BCT 2,CYCL1 FPAMSRV MF=E,PARAM=(8) * Fehlerauswertung der Parameterlisten * LR 3,8 R3 -> 1. Parameterliste USING ACCESSD,3 LA 2,30 Schleifenzähler CYCL2 DS 0F CLI FACCSR1,FACCRFSP BNE ERROR A 3,=A(FACC#) R3 -> nächste Parameterliste BCT 2,CYCL2 * *---------------------------------------------------------------------* * Schließen der Datei * *---------------------------------------------------------------------* FPAMSRV MF=M,PARAM=FPAMPL,FCT=*CLOSE FPAMSRV MF=E,PARAM=FPAMPL CLI FPAMSR1,FPAMRFSP BNE ERROR *---------------------------------------------------------------------* * DISABLE IOAREA-POOL * *---------------------------------------------------------------------* FPAMSRV MF=M,PARAM=FPAMPL,FCT=*DISIPO FPAMSRV MF=E,PARAM=FPAMPL CLI FPAMSR1,FPAMRFSP BNE ERROR *---------------------------------------------------------------------* * DISABLE ENVIRONMENT * *---------------------------------------------------------------------* FPAMSRV MF=M,PARAM=FPAMPL,FCT=*DISENV FPAMSRV MF=E,PARAM=FPAMPL CLI FPAMSR1,FPAMRFSP BNE ERROR *---------------------------------------------------------------------* * Speicherfreigabe für den IOAREA-POOL * *---------------------------------------------------------------------* RELM 30,(7) *---------------------------------------------------------------------* * Speicherfreigabe für die ACCESS-Parameterlisten * *---------------------------------------------------------------------* RELM 1,(8) * ERROR DS 0Y TERM * FPAMPL FPAMSRV MF=L,FCT=*ENAENV,ENVNAME='TESTENV',ACCNUMB=30, - MAXIOLN=*MINI,EVENTNG=*NO FPAMD FPAMSRV MF=D FACCPL FPAMACC MF=L,LEN=1, - OPCODE=*WRITE_WAIT FFFFFFFF DC X'FFFFFFFF' * END