Hi All
I have a CPYFRMIMPF statement and I would like to provide some error handling.
I thought that I had found a complete answer here: https://www.itjungle.com/2009/11/18/fhg111809-story02/
But it's not working for me.
The problem is that if I receive the last three messages, one after the other, it skips over the one I want. I contrived an error (added an extra comma in one record of the .csv), which results in one field's data not matching the target file field. Here are the last messages in the joblog:
1. Member GBLUP file GBLUP in QGPL cleared. (CPC3101 - Completion)
2. Current library changed to QGPL. (CPC2198 - Completion)
3. Member LSOUTPUT for file LSOUTPUT in library QGPL not found. (CPF5815 - Diagnostic)
4. The copy did not complete for reason code 9. (CPF2845 - Diagnostic)
5. 55 records copied to member GBLUP. (CPC2959 - Completion)
6. End of file detected for file LSOUTGBL in QGPL. (CPF0864 - Escape )
Now ... I'm interested in CPF2845 (No.4), which tells me everything I need to know in the second level text, but it doesn't get returned by RCVMSG. When I debug the program, I get for each of three RCVMSG statements:
CPF2817 (Monitored for, so not above) Message Type: 15 - Escape (exception already handled at time of RCVMSG)
CPC2959 (Number 5 above) Message Type 01 - Completion
CPC3101 (Number 1 above) Message Type 01 - Completion
The article I cite above indicates that it should work for diagnostic messages, which is the type I want, but it simply doesn't. It jumps right over two of them.
Any feedback welcome.
I have a CPYFRMIMPF statement and I would like to provide some error handling.
I thought that I had found a complete answer here: https://www.itjungle.com/2009/11/18/fhg111809-story02/
But it's not working for me.
The problem is that if I receive the last three messages, one after the other, it skips over the one I want. I contrived an error (added an extra comma in one record of the .csv), which results in one field's data not matching the target file field. Here are the last messages in the joblog:
1. Member GBLUP file GBLUP in QGPL cleared. (CPC3101 - Completion)
2. Current library changed to QGPL. (CPC2198 - Completion)
3. Member LSOUTPUT for file LSOUTPUT in library QGPL not found. (CPF5815 - Diagnostic)
4. The copy did not complete for reason code 9. (CPF2845 - Diagnostic)
5. 55 records copied to member GBLUP. (CPC2959 - Completion)
6. End of file detected for file LSOUTGBL in QGPL. (CPF0864 - Escape )
Now ... I'm interested in CPF2845 (No.4), which tells me everything I need to know in the second level text, but it doesn't get returned by RCVMSG. When I debug the program, I get for each of three RCVMSG statements:
CPF2817 (Monitored for, so not above) Message Type: 15 - Escape (exception already handled at time of RCVMSG)
CPC2959 (Number 5 above) Message Type 01 - Completion
CPC3101 (Number 1 above) Message Type 01 - Completion
The article I cite above indicates that it should work for diagnostic messages, which is the type I want, but it simply doesn't. It jumps right over two of them.
Any feedback welcome.
Comment