KB Article #64470

CFT Error Code 904: Open mode not authorized

Problem

How to solve the issue with message:



CFT Error Code 904: Open mode not authorized coming and thus transfers failing.


Resolution

The message "Open Mode Not Authorized" is because of the "NFNAME" parameter in CFTSEND method (open mode), and in the receiver side, this mode is not set.



The open mode means that the sender could define the file name in receiver side for transfered file. CFT uses NFNAME parameter to realize this feature.



Usage of NFNAME (Network file name) parameter is as follows:
If you want use the NFNAME parameter on sender side you must set &NFNAME in the value of FNAME in receiver side.  For example:



On sender side:



CFTSEND id   =   test,
                fcode    = ASCII,
                 ftype    = T,
                 fname    = cft241.test.test,
                 nfname = sample /* -------- > here you can specify the exact name of the file. */




On receiver side:



CFTRECV id   =   test,
                fcode    = ASCII,
                ftype    = T,
                fname    = C:\&NFNAME.txt   /* ----> Here you have to use the NFNAME symbolic variable. */



So if you want to use NFNAME, it must be used in both CFTSEND and CFTRECV definitions on the sender and receiver ends respectively. Thus after the transfer in the above example the file is received with the name sample.txt in C drive.