All the Query/38 commands can be used in applications that access local files or DDM files. And, wherever a local database file name can be specified on any of the Query/38 command parameters, a DDM file can also be specified, as long as any other limitations are met.
A DDM file name can be specified in the SRCFILE parameter of the Create Query Application (CRTQRYAPP) or Retrieve Query Source (RTVQRYSRC) command, but only if the target server is an iSeries server or a System/38 and if the target file is a source physical file.