We help IT Professionals succeed at work.

CPF5033 issue while reading the physical file

Low Priority
348 Views
Last Modified: 2018-07-02
Hi Experts,

We are getting the error message CPF5033 during READ operation in batch program and error message says the below.
"I/O error CPF5033 was detected in file B1PBILH (C G D F)."

When I check the log it says
" Select or omit error on field B1PBILH_1.BTCAR member B1PBILH.  
 Select/omit error on member B1PBILH.                            "

"I/O error CPF5033 was detected in file B1PBILH.                          
Function check. RNX1299 unmonitored by BLR573R1A at statement 0000048100,
  instruction X'0000'.                                                    "

I have checked the record lock and object lock on the file. No locks exist.
I have checked the data for the particular record where to check the junk value. No junk value exist.
And we are getting this error randomly for different records.

Program flow:
Cl program does the OVRDBF and then opnqry on the file and we read the same file in RPGLE with out key.
and we are getting CPF5033 error while performing the read operation on the file.

Please help me to fix the issue. I have attached the screen shot for your reference.


Thanks in advance.

Regards,
Sri
Comment
Watch Question

Gary PattersonVP Technology / Senior Consultant
CERTIFIED EXPERT

Commented:
The physical file has a select/omit logical file that is using field B1PBILH_1.BTCAR, and at least one row has an invalid value in this field.

Find the bad row in the physical file, fix it, and it will solve the problem.

Details for message CPF5033 will identify the specific row, and messages CPD4001 and or CPD4019 should have been logged as well, they provide additional troubleshooting information.

It is best when posting error messages here if you post the full message, first and second level text.  Second level text often provides important diagnostic information.

If the job is running and halted on an error in MSGW status, display the joblog, and put your cursor on each message and press F1 to see full details.

Author

Commented:
Hi Gary,

Thanks for the reply. As mentioned by you I could see the diagnostic message CPD4019 mentioned below.

"Message . . . . :   Select or omit error on field B1PBILH_1.BTCAR member          
  B1PBILH.                                                                        
Cause . . . . . :   A select or omit error occurred in record 0, record format    
  B1FBILH, member number 1 of file B1PBILH in library VMD0006, because of          
  condition 6 of the following conditions: 1 - The data was not valid in a        
  decimal field. 2 - A select or omit program error occurred because the data      
  in a select or omit field is not compatible with the select or omit              
  specifications. 3 - A select or omit program call error occurred. 4 - A          
  comparison was tried on a floating point field that was not a number. 5 -        
  The data was not valid in a double-byte character set (DBCS) field. 6 - A        
  data mapping error occurred on the field before the select or omit operation    
  was attempted. 7 - A data mapping error occurred on a record that was being      
  selected for a subquery. 8 - The escape character specified was not valid. 9    
  - The use of the escape character in the specified pattern was not valid. 10     "

I could make out that the error is due to "6 - A  data mapping error occurred on the field before the select or omit operation was attempted. " 
In our CLLE program we are using OPNQRYF command we are using map field. But this programs works fine in other boxes and only  fails in one of the box.

Your input was really helpful and I will investigate further to find out the issue.

Thanks again.

Sri
Gary PattersonVP Technology / Senior Consultant
CERTIFIED EXPERT

Commented:
Hi Sri,

As the message says, this is a data mapping problem: invalid data in at least on row of the underlying physical file that B1PBILH_1 is based on.  

Usually this is due to a decimal data error in the underlying file (blanks instead of zeroes in a numeric column - or a character column that is being interpreted as numeric by your OPNQRYF).

The next time this problem occurs, dump the RPG program, and you should be able to determine the specific row number causing the problem.  If you need help interpreting the dump, post it here, unless it contains confidential information.

Take another careful look at all of the messages on the job log.  Often with this type of error, one of the messages will identify the specific row that caused the problem.

We may be able to provide additional guidance if you can provide:

1) The OPNQRYF command that is being used
2) A dump from the failing program while it is in MSGW status.
3) DDS source, DSPFD, and DSPFFD for B1PBILH_1.
4) DDS source, DSPFD, and DSPFFD for the physical file(s) that B1PBILH_1 is based on.
Hi Gary,
Sorry for the late reply. I will surely look into above mentioned points if the issue occurs again.
But I have checked for the bad data in the BIPBILH file by looking into the particular RRN where job failed. I didn't find any bad data in the record.
If the issue occurs again I ll surely consider your inputs for trouble shooting.

Thanks again Gary.

Regards,
Sri
Gary PattersonVP Technology / Senior Consultant
CERTIFIED EXPERT

Commented:
I you want to post 1,3,4 above, I may be able to give you some additional guidance.

Author

Commented:
Hi Gary,

I apologies and  I am afraid that I can not post the DDS and OPNQRYF.
I will monitor the job and let you know if I come across any solution.

Thanks again Gary.

Regards,
Sri