FLAM4SEPA-API
FLAM4 SEPA Archive Interface (z/OS only)
|
Definition of used data structures for FLAM 4 SEPA APIs. More...
Data Structures | |
struct | F4sLoad |
Parameter structure to load an archive. More... | |
struct | F4sNfHeader |
Header structure for a lookup request. More... | |
union | F4sNfTab |
Overlay/Union for the different request structure arrays. More... | |
struct | F4sSearchIn |
Input parameter structure for lookups in an archive. More... | |
struct | F4sUpdateIn |
Input parameter structure to update records in or delete from an archive. More... | |
struct | F4sMigrateIn |
Input parameter structure to migrate the signature file of the SEPA archive. More... | |
struct | F4sGenerateIn |
Input parameter structure to generate the signature file of the SEPA archive. More... | |
struct | F4sOut |
Output structure. More... | |
struct | F4sNfEntry21 |
Parameter structure to define the search field for an research in an archive. More... | |
Typedefs | |
typedef struct F4sLoad | TsF4sLoad |
Parameter structure to load an archive. | |
typedef struct F4sNfHeader | TsF4sNfHeader |
Header structure for a lookup request. | |
typedef union F4sNfTab | TuF4sNfTab |
Overlay/Union for the different request structure arrays. | |
typedef struct F4sSearchIn | TsF4sSearchIn |
Input parameter structure for lookups in an archive. | |
typedef struct F4sUpdateIn | TsF4sUpdateIn |
Input parameter structure to update records in or delete from an archive. | |
typedef struct F4sMigrateIn | TsF4sMigrateIn |
Input parameter structure to migrate the signature file of the SEPA archive. | |
typedef struct F4sGenerateIn | TsF4sGenerateIn |
Input parameter structure to generate the signature file of the SEPA archive. | |
typedef struct F4sOut | TsF4sOut |
Output structure. | |
typedef struct F4sNfEntry21 | TsF4sNfEntry21 |
Parameter structure to define the search field for an research in an archive. | |
Definition of used data structures for FLAM 4 SEPA APIs.
Parameter structure to load an archive.
Defines the dataset with a list of DSNs for FLAMFILEs containing the load records. The dataset must contain a FLAMFILE name or a comment per record. A comment starts with a star '*' in the first column. All other lines are interpreted as data set name. The maximum supported record length is 128. You can provide FB or VB (max 124 character) data sets.
The number of datasets read from the list dataset can be limited. An error will occur at the end (anything was done) if the amount of datasets was not read. There could be more datasets in the list file than defined via AnzDsNames. If the amount is 0, then all dataset names are read from the list dataset.
The archive consists of 4 FLAMFILEs. For each FLAMFILE, the DD name must be provided. It is the responsibility of the user to allocated these datasets correctly depending on the used version.
The function returns a two digit return code ('12') and an error text. If the return code was initialized with '02', then appending to the archive is activated, with '03' the append is done with plausibility check of member names (required for archive older than version 23). With '10' you can enforce the late open at load. This means that no FLAMFILE clusters are written, if no records provided at initial load. With '12' or '13' you deactivate the late open for append and enforce the behavior before FLAM version 5.1.28.
If the error text is initialized with LOGx (x=1/2/3), a log is written to SYSOUT with the requested depth.
If the function was successful, the return code is "00" and statistics are written as error text. In all other cases, the function return "12" and an error message.
01 LG-PARMS. 05 LG-PARMS-IN. 10 LG-INPUT-DATA. 15 LIST-DATASET PIC X(44) VALUE "FLAM.F4S21.DATEI.LISTE1". 15 ANZ-DS-NAMES PIC 9(05) VALUE 4. 10 LG-OUTPUT-DATA. 15 DDN-SIG PIC X(8) VALUE "DDSIG". 15 DDN-TRA PIC X(8) VALUE "DDTRA". 15 DDN-XLM PIC X(8) VALUE "DDXML1". 15 DDN-XLM PIC X(8) VALUE "DDXML2". 05 LG-PARMS-OUT. 10 LN-RC PIC 9(02). 88 RCOK VALUE ZERO. 88 RCNOK VALUE 12. 10 ERROR-TEXT PIC X(80).
typedef struct F4sNfHeader TsF4sNfHeader |
Header structure for a lookup request.
This header structure consists of 2 IDs provided by the requester and the number of matches found by this function while processing the lookup request. This structure is also the prefix of each result record found for this request. The only difference is that the result record contains the sequence number of matches and at the end of the lookup function, acAnzResults contains the total number of matched records for this request.
10 NF-ID. 15 ID-BT PIC 9(08) VALUE ZERO. 15 IDNR PIC 9(05) VALUE ZERO. 10 ANZ-RESULTS PIC 9(06) VALUE ZERO.
typedef union F4sNfTab TuF4sNfTab |
Overlay/Union for the different request structure arrays.
In this form of the interface, a new search field will result in an extended lookup structure. This means that for each extension of the search field, a new request structure must be defined.
typedef struct F4sSearchIn TsF4sSearchIn |
Input parameter structure for lookups in an archive.
This structure contains the four dataset names (DSN) for the SEPA archive. The maximum number of search results per request can be defined (0 = unlimited) and a maximum of 50 requests can be specified per lookup.
01 LG-PARMS-IN. 05 LG-PARMS-IN-DSNS. 10 DSN-SIG PIC X(44) VALUE "FLAM.F4S21.SIGDAT.VR8". 10 DSN-TRA PIC X(44) VALUE "FLAM.F4S21.TRADAT.VR8". 10 DSN-XMLI PIC X(44) VALUE "FLAM.F4S21.XMLDAT1.ADC". 10 DSN-XMLO PIC X(44) VALUE "FLAM.F4S21.XMLDAT2.ADC". 05 MAX-RESULTS PIC 9(06) VALUE 10. 05 ANZ-NF PIC 9(02) VALUE 11. 05 NF-TAB OCCURS 50 DEPENDING ON ANZ-NF.
typedef struct F4sUpdateIn TsF4sUpdateIn |
Input parameter structure to update records in or delete from an archive.
This structure consists of three data set names. The first DSN defines the FLAMFILE containing the transaction records to be updated. The other two DSN are the signature and transaction FLAMFILE of the SEPA archive. A flag activates deletion of the defined record.
For deleting a record, only the transaction key (first 50 bytes) must be provided. For updating, the complete transaction record including a correct length field for the used version must be specified. The record can be longer (e.g. the load dataset). The length field of length 5 at offset 50 is used for update.
To update a record, the version 23 of the FLAM 4 SEPA archive with a KSDS for the signature file is required. The function internally calls the migrate function to ensure this.
01 LG-PARMS. 05 LG-PARMS-IN-DSNS. 10 DELETE PIC X(1) VALUE "N". 10 DSN-UPD PIC X(44) VALUE "FLAM.F4S21.UPDATE.VR8". 10 DSN-SIG PIC X(44) VALUE "FLAM.F4S21.SIGDAT.VR8". 10 DSN-TRA PIC X(44) VALUE "FLAM.F4S21.TRADAT.VR8".
typedef struct F4sMigrateIn TsF4sMigrateIn |
Input parameter structure to migrate the signature file of the SEPA archive.
This structure consists of two data set names. The first DSN defines the signature file to be rewritten (remove, disp=new allocation, open write, close and de-allocation). The second name is the transaction data set of the SEPA archive.
Migration is only executed if the signature file is in an older version than the current version of the load module or if the signature length has changed or the file organization or record format mismatch. Otherwise, the signature file is not re-written. To rewrite the signature file, the migrate function calls the generate function internally.
01 LG-PARMS. 05 LG-PARMS-IN-DSNS. 10 DSN-SIG PIC X(44) VALUE "FLAM.F4S21.SIGDAT.VR8". 10 DSN-TRA PIC X(44) VALUE "FLAM.F4S21.TRADAT.VR8".
typedef struct F4sGenerateIn TsF4sGenerateIn |
Input parameter structure to generate the signature file of the SEPA archive.
This structure consists of one DD name and one data set name. The first DD name defines the signature file to be re-written and the second DSN the transaction data set of the SEPA archive.
Through the static allocation of the signature file, the user can ensure enough space and must define the correct attributes depending on the version of the archive.
01 LG-PARMS. 05 LG-PARMS-IN-DSNS. 10 DDN-SIG PIC X(8) VALUE "DDSIGNAT". 10 DSN-TRA PIC X(44) VALUE "FLAM.F4S21.TRADAT.VR8".
Output structure.
This structure consists of a two digit return code and 80 bytes of error text. If the error text has been initialized with LOGn, then SYSOUT logging in the defined depth (n=0-9) is activated. Currently, the maximum level is 4 which is used by the update and research function. All other functions have a maximum log level of 3. Additionally, sequential search can be activated for the lookup function with 'SEQ' starting at the 5th byte, which ignores the signature file. This is mainly for verification.
At load, appending (reload) to the archive can be activated if the return code is initialized with '02' or '03' where the latter activates an additional plausibility check of the existing FLAMFILEs. For the initial load an return code of '10' result in open of FLAMFILEs only if records provided. This behavior is default at append since version 5.1.28 of FLAM to prevent the mismatch error of the identifier in the plausibility check at lookup.
At lookup, the first digit of the return code can be used to select one of the following options:
The second digit can be used for:
In case of an error, "12" and an error message is written to these fields.
ATTENTION: It is necessary to deactivate the plausibility check if an append has been made without any records and the signature file is not a KSDS (version 22 or older). In this case the empty member will be found as the first record in the 3 KSDS datasets and as the last record in the signature file and the comparison of the identifier will result in a mismatch. To avoid this error, the second digit of the return code must be initialised with '1' or '2'. With the latest build of version 5.1.28, the 4 FLAMFILES are opened after the first record is read. If no record is provided, the FLAMFILES are not touched. This means that since this change the problem can no longer be produced, but there may still be archives containing this problem.
01 LG-PARMS-OUT. 05 RETCO PIC 9(02). 88 RCOK VALUE ZERO. 88 RCNOK VALUE 12. 05 ERROR-TEXT PIC X(80).
typedef struct F4sNfEntry21 TsF4sNfEntry21 |
Parameter structure to define the search field for an research in an archive.
This structure is used to define the fields search for. Each field different to low values will be included into the research.
10 SEARCH-DATA. 15 NSYSTEM PIC X(01). 15 NBTAG PIC 9(08). 15 OUT-TX-KEY. 20 OUTFLID PIC X(07). 20 OUTBKID PIC 9(03). 20 OUTBKTXNR PIC 9(07). 15 IN-TX-KEY. 20 INFLID PIC X(07). 20 INBKID PIC 9(03). 20 INBKTXNR PIC 9(07). 15 REFRENCES. 20 SVCID PIC X(03). 20 MSGID-IN PIC X(35). 20 FLHDRID-IN PIC X(16). 20 MSGID-OUT PIC X(35). 20 FLHDRID-OUT PIC X(16). 20 PAYMNTINFID PIC X(35). 20 ORDBNKID PIC X(35). 15 PMTTYP. 20 PTYP-IN PIC X(06). 20 PTYP-OUT PIC X(06). 15 CREDITOR. 20 CREDACCIBAN PIC X(34). 20 CREDAGTBIC PIC X(11). 15 DEBITOR. 20 DEBTAGTBIC PIC X(11). 20 DEBTACCIBAN PIC X(34). 15 AMOUNTS. 20 TOT-INBK PIC 9(18). 20 TOT-OUTBK PIC 9(18). 20 TXAMNT PIC 9(18). 15 ROUTING. 20 LTWBIC PIC X(11). 20 LTWACCOUNT PIC 9(10). 20 LTWIBAN PIC X(34). 15 ERRORS. 20 ERRCDEXT PIC X(04). 15 SDD. 20 MNDTREF PIC X(35). 20 CREIDTX PIC X(35). 20 BLKOBIC PIC X(11). 15 T2. 20 ENDTOENDID PIC X(35). 15 AUSBLIC. 20 STATAKT PIC 9(3). 20 TXBUCHST PIC X(3). 15 ORG-TX-ID PIC X(35). *SINCE VERSION 2.2 15 SEPA2020. 20 REASON-RTRANS PIC X(04).