30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

found' condition */<br />

CPYF FROMFILE(NOLIB/NOFILE) TOFILE(D504/KEY) +<br />

FROMMBR(NOMBR) TOMBR(MBR1) MBROPT(*ADD)<br />

MONMSG MSGID(CPF2817) CMPDTA(CPF2802) +<br />

EXEC(SNDPGMMSG TOPGMQ(*EXT) +<br />

MSG('<strong>File</strong> NOFILE in NOLIB not found'))<br />

ENDPGM<br />

Any error other than from-file not found, including any other error reported with<br />

a CPF2817 escape message, causes a check in this program because the MONMSG<br />

command applies only to the CPF2817 escape when it has the compare data from<br />

message CPF2802.<br />

If you are running the CPYFRMQRYF command, it does not normally close the<br />

open query file after completing the copy. However, if you are running the<br />

CPYFRMQRYF command from a command entry line, any error messages<br />

occurring after the OPNQRYF command is successfully run will close the file<br />

unless you specified TYPE(*PERM) on the OPNQRYF command. The system<br />

automatically runs a Reclaim Resources (RCLRSC) command if an error message<br />

occurs. If the OPNQRYF command specified TYPE(*PERM), the system does not<br />

automatically close the file.<br />

The following messages can be sent as diagnostic messages, followed immediately<br />

by a CPF2817 escape message. Some of these messages can also be sent as other<br />

message types (such as an informational or escape message). When the message is<br />

sent as a diagnostic message type, the message identifier appears in the<br />

replacement text of the CPF2817 escape message. You can monitor the condition by<br />

using the CMPDTA parameter on the MONMSG command:<br />

CPD2807 CPD2808<br />

CPD2809 CPD2810<br />

CPD2811 CPD2812<br />

CPD2825 CPD2968<br />

CPD2969 CPD2970<br />

CPD2971 CPD2972<br />

CPD2973 CPD2974<br />

CPD2975 CPD2976<br />

CPD2979 CPD2980<br />

CPD2981 CPF2801<br />

CPF2802 CPF2803<br />

CPF2804 CPF2805<br />

CPF2806 CPF2807<br />

CPF2808 CPF2810<br />

CPF2811 CPF2812<br />

CPF2813 CPF2814<br />

CPF2816 CPF2819<br />

CPF2820 CPF2821<br />

CPF2822 CPF2823<br />

CPF2825 CPF2826<br />

CPF2827 CPF2831<br />

CPF2832 CPF2833<br />

CPF2834 CPF2836<br />

CPF2837 CPF2839<br />

CPF2840 CPF2841<br />

CPF2842 CPF2843<br />

CPF2844 CPF2847<br />

CPF2848 CPF2849<br />

CPF2851 CPF2853<br />

CPF2854 CPF2855<br />

CPF2856 CPF2857<br />

CPF2860 CPF2861<br />

CPF2862 CPF2863<br />

CPF2864 CPF2865<br />

CPF2868 CPF2869<br />

CPF2870 CPF2871<br />

Monitoring for zero records in the from-file<br />

CPF2872 CPF2873<br />

CPF2874 CPF2877<br />

CPF2878 CPF2879<br />

CPF2881 CPF2883<br />

CPF2884 CPF2890<br />

CPF2891 CPF2893<br />

CPF2960 CPF2962<br />

CPF2963 CPF2965<br />

CPF2969 CPF9807<br />

CPF9808 CPF9820<br />

CPF9830<br />

There are some special considerations for copy when the from-file is a physical or<br />

logical file and one or more members to be copied are empty. A member is<br />

considered empty in the following cases:<br />

v You specified COMPRESS(*NO) on the CPYF command, and the from-file<br />

member contains no records.<br />

v You specified COMPRESS(*YES) for a COPY command, and the from-file<br />

members contain no undeleted records.<br />

Members copied involving record selection (CPYFRMQRYF command or the<br />

INCCHAR and INCREL parameters of the CPYF command) that produce no<br />

records are not considered empty.<br />

When the to-file is a printer file (including *PRINT), or when the to-file is a<br />

physical file and you specified MBROPT(*ADD) or MBROPT(*UPDADD), empty<br />

Chapter 4. Copying files 79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!