This example shows how to create a local file and use it to define the data that is to be queried in a non-iSeries™ or non-System/38™ remote file.
Assume that a DDM file named RMTS36FILE exists on your iSeries server and it refers to a remote System/36™ file that you want to query. You can perform the following steps to: determine the attributes of the remote System/36 file; locally create a physical file that has the attributes of the remote file; and define, create, and run the Query/38 against the remote file.
DSPFFD FILE(RMTS36FILE) SYSTEM(*RMT)
In this example, the displayed results would show that the remote file's record length is 80 characters, its record format name is RMTS36FILE, and it has two fields: K00001, with 12 characters (starting in position 1), and F00001, with 68 characters (starting in position 13). The K in field K00001 indicates it is the key field for this format.
A R RMTS36FILE A CUSNO 6A A BILLCODE 6A A ADDR1 15A A ADDR2 15A A ADDR3 15A A ZIP 5A A AMTOWE 7S 2 A OUTBAL 7S 2 A MISC 4A A K CUSNO A K BILLCODE
OVRDBF FILE(LCLS36FILE) TOFILE(RMTS36FILE)
When the Query/38 application is run, this command overrides the local file you created with the DDM file that is associated with the desired target file.