IBM Support

CPYTOSTMF or CPYFRMSTMF with message CPFA0A9 Object not found.

Troubleshooting


Problem

CPYTOSTMF or CPYFRMSTMF has a msgCPFA0A9 "Object not found"

Cause

Likely an issue with relative path instead of absolute path.

Diagnosing The Problem

The answer is likely in the Message and Cause of the CPFA0A9.

CPYTOSTMF FROMMBR('QSYS.LIB/KTRISKO.LIB/QCLSRC.FILE/FILE1.MBR')
          TOSTMF('tmp/ktrisko') STMFOPT(*REPLACE)

CPFA0A9   Object not found. Object is /tmp/QSYS.LIB/KTRISKO.LIB/QCLSRC.FILE/FILE1.MBR.
Notice the the /tmp in bold.
You likely did not want to look for ktrisko/qclsrc.file1 in the IFS.  

Resolving The Problem

Option 1 - absolute path.  A leading slash / before the FROMMBR and TOSMTF results in a specific location.
CPYTOSTMF FROMMBR('/QSYS.LIB/KTRISKO.LIB/QCLSRC.FILE/FILE1.MBR')
          TOSTMF('/tmp/ktrisko') STMFOPT(*REPLACE)
CPCA082   Object copied.
Object /QSYS.LIB/KTRISKO.LIB/QCLSRC.FILE/FILE1.MBR successfully copied to object /tmp/ktrisko
Option 2 - continue to use relative path, but specify the current directory.
cd '/'
CPYTOSTMF FROMMBR('QSYS.LIB/KTRISKO.LIB/QCLSRC.FILE/FILE1.MBR') 
          TOSTMF('tmp/ktrisko') STMFOPT(*REPLACE)
CPCA082   Object copied.
Object /QSYS.LIB/KTRISKO.LIB/QCLSRC.FILE/FILE1.MBR successfully copied to object /tmp/ktrisko

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CQ3AAM","label":"IBM i Db2-\u003ECPYTOIMPF \/ CPYFRMIMPF"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Document Information

Modified date:
23 January 2023

UID

ibm16857045