LIBRCOPY is failing with message LIBC011E

Document ID : KB000053581
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

LIBRCOPY is an User Contributed Routine (UCR) and its messages are not yet documented in the CA-Librarian Guides. However, the connection to the return code within the LIBC011E message, is in chapter "FAIROPN Result Area (OPENRES)" in the CA-Librarian "File Access Interface Routines Guide".

Solution:

Here is a sample. If the message is: LIBC011E FAIROPN FAILED FOR DESTMAST; RC = 11 - you have to split the RC = 11 into the first digit (OPENRET) and the second digit (OPENREA). Both is 1 in this case. Here is the relevant part from the "File Access Interface Routines Guide", chapter "FAIROPN Result Area (OPENRES)" :

...                                                                   
00  OPENRET  One byte indicating how FAIROPN processing ended. The possible
             values are:              
...
             = C'1' FAIROPN found that the master file was invalid or the
             user is not authorized.
...
01  OPENREA  One byte indicating the reason for any failure of FAIROPN
             processing. The caller uses this digit only if the digit at
             OPENRET is C'1' or C'2'. If it is not, then FAIR sets this field
             to C'0'.
             If the value of OPENRET is C'1', the possible values for OPENREA
             are:
...
             = C'1' FAIROPN tried to open a disk master file, but the master
             file format was invalid.
...