Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

output only fields in subfile

Status
Not open for further replies.

tbeasley

Programmer
Feb 17, 2010
2
US
I have specified output-only fields in a subfile format, yet the fields appear in the input specs in the RPG program that uses the display file. Why is this?

I have even created a stripped-down test program with only one output-only field, no complex keyword combinations, nothing but WRITE to the subfile format and EXFMT to the control record format. But the output-only field still appears in the input specs of my RPG compile. This makes no sense.
 
You have to realize that the subfile is not what you see on the display...it is a separate entity. You put records into the subfile and get records out of the subfile as whole records, regardless of the usage attribute (input only, output only, both input/output, hidden, etc.) and regardless of whether the field is selected (with an indicator) or not selected. The usage attributes and field selection control only the interaction between the subfile and the display when reading and writing the control record.

So your program can put data into the subfile and it comes back when you read the subfile, regardless of whether or not it ever went to the display.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top