Compiling and running your programs under CMS in VM

The following program compiles and runs your callable interface application using the PL/I compiler.

QMF does not ship the REXX EXEC in this example, but you can copy it from here, altering it to suit your installation.

Figure 62. REXX program to compile and run your program
/******************************************************************/
/* Compile QMF PL/I program and run it.          */
/******************************************************************/
TRACE off
ADDRESS CMS
 
/******************************************************************/
/* Access PL/I product disk using a program, PRODUCT, that you    */
/* write.                                                         */
/******************************************************************/
"EXEC PRODUCT PLIV"
 
/******************************************************************/
/* Get QMF DSQCOMM into a macro library and set GLOBAL compile    */
/* maclibs.                                                       */
/******************************************************************/
"ERASE TEMPP MACLIB A"
"MACLIB GEN TEMPP DSQCOMML"
Maclist = "TEMPP PLICOMP DMSSP CMSLIB OSMACRO"
"GLOBAL MACLIB" Maclist
 
/******************************************************************/
/* Compile the program                                            */
/******************************************************************/
POPTS = '(INC SOURCE LIST LMSG M NAG NC(E) NIS NOESD NSTG OPT(2)'
'PLIOPT' yourname popts
 
/******************************************************************/
/* Access SQL/DS and initialize database                          */
/******************************************************************/
"EXEC PRODUCT SQLDS"
"EXEC SQLINIT DBNAME(SQLDBA)"
 
/******************************************************************/
/* Access GDDM product disk                                       */
/******************************************************************/
"EXEC PRODUCT GDDM"
 
/******************************************************************/
/* Issue Filedefs for QMF product                                 */
/******************************************************************/
"FILEDEF ISPLLIB CLEAR"
/* DEBUG = DDNAME FOR QMF DIAGNOSTICS OUTPUT       */
"FILEDEF DSQDEBUG PRINTER ( LRECL 80  BLKSIZE 80  RECFM FBA PERM"
/* PRINT = DDNAME FOR QMF PRINTED OUTPUT                          */
"FILEDEF DSQPRINT PRINTER ( LRECL 133 BLKSIZE 133 RECFM FBA PERM"
/* EDIT  = DDNAME FOR QMF EDIT TRANSFER FILE                      */
"FILEDEF DSQEDIT DISK QMFEDIT FILE A (PERM"
/* DSQSIDE = DDNAME FOR QMF SPILL FILE                            */
"FILEDEF DSQSPILL DISK DSQSIDE DATA A1 (PERM"
/* DSQPNLE = DDNAME FOR PANEL FILE                                */
"FILEDEF DSQPNLE DISK DSQPNLE FILE * (PERM"
"FILEDEF ISPLLIB CLEAR"
"FILEDEF ISPLLIB DISK DSQLDLIB LOADLIB *"
 
/******************************************************************/
/* Provide access to QMF and PL/I program libraries               */
/******************************************************************/
'GLOBAL MACLIB TEMPP'
'GLOBAL LOADLIB DSQLDLIB PLILIB'
'GLOBAL TXTLIB PLILIB IBMLIB ADMRLIB ADMPLIB ADMGLIB'
 
 
Say "Starting to run PL/I program"
"RUN yourname"
 
Exit 0

You might have to modify this program to suit your installation.

[ Previous Page | Next Page | Contents | Index ]