This topic shows how the pseudocode program for the previous task can be changed so a MASTER file on the System/36™ in Dallas can be accessed in the same way as the MASTER files on the iSeries™ servers and System/38™ in Example 3.
Assume that either you have pass-through to the System/36, or that an operator at the System/36 can make changes, if necessary, on the System/36 for you.
The following command is issued on the server in Philadelphia:
CRTDDMF FILE(PGMLIB/DALFILE) RMTFILE(MASTER) RMTLOCNAME(DAL) ACCMTH(*KEYED)
Because the remote file referred to by the DDM file named DALFILE is on a System/36, either of two things must be done:
Here is a sample of the pseudocode to accomplish the task:
DECLARE CHIFILE, TORFILE, NYCFILE, DALFILE INPUT Open CHIFILE, TORFILE, NYCFILE and DALFILE LOOP: Show a display asking for ITEMNO Read ITEMNO from the display Read record from CHIFILE with the key ITEMNO Read record from TORFILE with the key ITEMNO Read record from NYCFILE with the key ITEMNO Read record from DALFILE with the key ITEMNO Write all QOH values to the display If not function key, go to LOOP Close CHIFILE, TORFILE, NYCFILE and DALFILE END