R RZ0101R1 F0 5A I F1 5P 2O notice I and O in pos(38)This gives me an error "Characters in indicated field not allowed" and doesn't allow both I & O. If I read the msg literally, my wild guess is: the issue is not I or O, the issue is some combination of usage and field type. Here is a list of my ignorance. I1: How to declare a field in PF as input or output only. Clearing this doubt would automatically clear another doubt in using the KW 'likerec' used in RPGLE.
dcl-ds rec likeRec(PFname: *input|*output|*all|*key).I2. I assume unique key fields are implicitly input only, but not sure I'm right about that. Besides, some sensitive non-key fields can be declared as input, agreed. But why output only, why would someone push a data into O filed but never can read that, beats me. I am fairly conversant with DSPF, my ignorance is in DBF only. Would appreciate clearing the doubts
Discuss This Question: 5  Replies
I only use those fields in a display file. Using them in a physical file does not make sense. I suppose you could use B (Both input and output) instead of the way the example is, but why go to the extra work?
Just thinking through this for a PF, if the field is input only, you can add data to the field, but never retrieve it. If it is output only, you can retrieve the data from the field, but never put data into the field. Either way the field is useless.
Also note, you quote the manual as saying that acceptable characters are blank, I, B, and N. But your example shows an O which was not in the list. I am not sure where you found this, but when I look at the help file for this field for a physical file, it only shows me that blank and B are acceptable options.