|
If you want to use RPGIII I would not try to execute a command that I
expect to end in error. I would probably call qcmdexc and pass a chkobj
command to first establish whether it exists and I have authority. To do this
you need the indicator in the error column and you need to define the SDS
for positions 40-46 where an error message may be returned. If the indicator
comes on check for a does not exist messange CPF9801and execute the
CRTPF via qcmdexc with no error indicator. This way you will know about any
creation errors. You could also call a CL program if you are not doing this
much.
If you are using RPGIV I would create procedures to call qcmdexc and one to
check whether an object exists, etc. and place it in a service program. Use
the
INFDS as above. In this case I would not use CLLE because of bugs associated
with return variables.
A few alternatives
David Morris
>>> Cyndi Bradberry <CyndiB@ihfa.org> 01/08 7:01 AM >>>
I am making a call to QCMDEXC from an RPG program. The
command being executed is CRTPF. I recieve a CPF7302 level
40 message 'File ABC not created in library XYZ. I need away to
monitor and ignore the message if the file already exists; I plan
to overwrite the previous file.
Any help would be appreciated.
Cyndi
IHFA
Boise, ID
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.