Q. I am in the middle of creating an interactive program that uses a subfile. The subfile provides input-capable fields on the leftmost column so the user can enter option numbers-like IBM's WRKSPLF command. In addition, I would like to provide several other input fields. Circumstances have forced me to include some of the additional input fields into a separate record format which is not the subfile control record. How can I code my RPG program so that it receives all input: the option numbers and the additional input fields?
A. All you need to do is code several READ operations one after the other. For example, let's suppose your subfile control record is called CTL1 and the other input-capable panel is called INPUT1. Code the following:
C WRITEINPUT1 C EXFMTCTL1 C READ INPUT1 99
The EXFMT operation on the subfile control record (CTL1) reads the subfile control record (if any input fields are present) and the option fields from the subfile records. The READ operation that follows processes the additional panel you have.
LATEST COMMENTS
MC Press Online