Start of change

ASSOCIATE_JOURNAL_RECEIVER table function

The ASSOCIATE_JOURNAL_RECEIVER table function associates one or more journal receivers with a journal if the journal receiver was originally associated with the journal.

Authorization: The caller must have:
  • *EXECUTE authority to the library containing the journal receiver
  • *OBJMGT authority to the journal receiver
  • *EXECUTE authority to the library containing the journal
  • *OBJMGT and *OBJOPR authority to the journal
Read syntax diagramSkip visual syntax diagram ASSOCIATE_JOURNAL_RECEIVER ( JOURNAL_LIBRARY =>  journal-library , JOURNAL_NAME =>  journal-name ,RECEIVER_LIBRARY =>  receiver-library ,RECEIVER_NAME =>  receiver-name )
The schema is QSYS2.
journal-library
A character or graphic string expression that identifies the library that contains journal-name. Can contain the special values *LIBL or *CURLIB.
journal-name
A character or graphic string expression that identifies the name of the journal.
receiver-library
A character or graphic string expression that identifies the name of the library containing receiver-name. Can contain the special values *LIBL or *CURLIB.
receiver-name
A character or graphic string expression that identifies the name of the journal receiver.
A generic name can be specified to select specific journal receivers. If the last character in the name is an asterisk, the name is a generic name. For example, to select all journal receivers that start with 'JR', specify a receiver-name value of 'JR*'.
The special value of *ALL can be used to select all journal receivers in receiver-library. *ALL is not allowed if receiver-library is *LIBL.

The result of the function is a table containing rows with the format shown in the following table. All columns are nullable.

Table 1. ASSOCIATE_JOURNAL_RECEIVER table function
Column name Data type Description
JOURNAL_LIBRARY VARCHAR(10) The library containing the journal that the journal receiver attempted to associate with.
JOURNAL_NAME VARCHAR(10) The journal that the journal receiver attempted to associate with.
RECEIVER_LIBRARY VARCHAR(10) The library containing the journal receiver.
RECEIVER_NAME VARCHAR(10) The journal receiver.
RESULT VARCHAR(7) Result type.
FAILURE
The operation did not complete.
SUCCESS
The operation completed successfully.
WARNING
The operation completed but a warning was issued.
RESULT_DETAIL VARGRAPHIC(100)
CCSID 1200
Descriptive text that corresponds to RESULT.
RETURN_CODE INTEGER The return code that corresponds to the result.
0
The specified journal receiver was successfully associated with the specified journal.
1
The specified journal receiver was already associated with the specified journal.
2
The specified journal receiver could not be associated with the specified journal because the journal receiver was already associated with a different journal.
3
The specified journal receiver could not be associated with the specified journal because the journal receiver was never associated with that journal or could not be associated with that journal in a remote journal network.
4
The specified journal receiver could not be associated with the specified journal because the journal receiver’s library could not be found.
5
The specified journal receiver could not be associated with the specified journal because the journal receiver could not be found.
6
The specified journal receiver could not be associated with the specified journal because the journal’s library could not be found.
7
The specified journal receiver could not be associated with the specified journal because the journal could not be found.
8
The specified journal receiver could not be associated with the specified journal because the journal receiver could not be locked.
9
The specified journal receiver could not be associated with the specified journal because the journal could not be locked.
10
The specified journal receiver could not be associated with the specified journal because the user is not authorized to the journal receiver’s library.
11
The specified journal receiver could not be associated with the specified journal because the user is not authorized to the journal receiver.
12
The specified journal receiver could not be associated with the specified journal because the user is not authorized to the journal’s library.
13
The specified journal receiver could not be associated with the specified journal because the user is not authorized to the journal.
14
The specified journal receiver could not be associated with the specified journal because the journal receiver is damaged.
15
The specified journal receiver could not be associated with the specified journal because the journal is damaged.
16
The specified journal receiver could not be associated with the specified journal because the journal receiver and journal are not both in the system or user auxiliary storage pools (ASPs) or the journal receiver and journal are in different independent auxiliary storage pool (IASP) groups.

Example

Re-establish the association of journal APPLIB/APPJRN with journal receiver RCVRLIB/RCV001.
SELECT *
   FROM TABLE(QSYS2.ASSOCIATE_JOURNAL_RECEIVER('APPLIB', 'APPJRN', 'RCVRLIB', 'RCV001'));
End of change