Compiling and running your programs under CMS in VM

The following program compiles and runs your callable interface application using the IBM COBOL 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 48. Program for compiling and running COBOL in CMS
/******************************************************************/
/* Compile your COBOL program and run it.        */
/******************************************************************/
TRACE off
ADDRESS CMS
/******************************************************************/
/* Access COBOL product disk using a program, PRODUCT, that you   */
/* write.                                                         */
/******************************************************************/
"EXEC PRODUCT COBOL"
/******************************************************************/
/* Get QMF DSQCOMM into a macro library and set GLOBAL compile    */
/* maclibs.
/******************************************************************/
"ERASE TEMPP MACLIB A"
"MACLIB GEN TEMPP DSQCOMMB"
Maclist = "TEMPP VSC2MAC COB2MLIB COB2PLIB DMSSP CMSLIB OSMACRO"
"GLOBAL MACLIB" Maclist
/******************************************************************/
/* Compile the program                                            */
/******************************************************************/
"GLOBAL TXTLIB SCEELKED"
"COBOL2 yourname (LIB RESIDENT LIST RENT DYNAM"
/******************************************************************/
/* 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                                 */
/******************************************************************/
/* 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 COBOL program libraries              */
/******************************************************************/
"GLOBAL LOADLIB DSQLDLIB VSC2LOAD"
"GLOBAL TXTLIB VSC2LTXT ADMRLIB ADMPLIB ADMGLIB SCEELKED"
Say "Starting to run COBOL program"
"RUN yourname"
Exit 0
[ Previous Page | Next Page | Contents | Index ]