1,780 pts.
 CPYTOSTMP
I'm copying to a stream file and if the object exists it works. The help says if it does not exist it will create it. Here is the error msg Message ID . . . . . . : CPFA0A9 Severity . . . . . . . : 40 Message type . . . . . : Escape Date sent . . . . . . : 04/29/09 Time sent . . . . . . : 11:39:29 Message . . . . : Object not found. Object is /RON/GSPOOL.TXT. I'm not sure what is going on. Any ideas. Thanks Ron

Software/Hardware used:
ASKED: April 29, 2009  3:49 PM
UPDATED: May 1, 2009  8:35 PM

Answer Wiki:
Taking a shot here - does the user of job have authority to create files in that folder? I would think that should throw an authority message but it might also throw this message. Phil Yeah the user has athority. I just figured it out. Instead of QDLS/RON/GSPOOL.TXT it should have been /RON/GSPOOL.TXT Its not looking in a folder so I don;t need that. My bad. I think I need glasses. Sorry Thanks Ron
Last Wiki Answer Submitted:  April 30, 2009  1:09 pm  by  philpl1jb   44,220 pts.
All Answer Wiki Contributors:  philpl1jb   44,220 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

here is the statement
CPYTOSTMF +
FROMMBR(‘/QSYS.LIB/QTEMP.LIB/GSPOOL.FILE/GS+
POOL.MBR’) TOSTMF(‘/QDLS/RON/GSPOOL.TXT’) +
STMFOPT(*REPLACE) STMFCODPAG(*PCASCII)

 1,780 pts.

 

Hello,

With STMFOPT(*REPLACE) you are telling it to replace the contents of the existing file. It will only create the file if it doesn’t exist with the *NONE option.

 1,050 pts.

 

replace creates the file also. Just like cpyf does.

 1,780 pts.