After posting answer about passing parameters to QMQRY I received questions concerning IBM limitation to SETVAR options in STRQMQRY command. What to do if variable value exceeds 55 characters? Below is extract from CL program and QMQRY I999Q. Program creates INPUT (command) file for FTP in MyLIB QTXTSRC. Concatenated &CMD1 and &CMD2 with summary length greater than 55 are defined as separate variables in CL. Date/Time added to charater string as system values Just keep in mind that example shows how to SETVAR, not how to FTP. DUMMY is one record dummy file and no actual data is extracted from it. STRIP command removes all unwanted blanks.
Code

Reply With Quote