Running your C programs in TSO

The following sections provide sample jobs for compiling and link-editing your callable interface application and sample programs for running your compiled programs either with or without ISPF.

Compiling and link-editing in TSO

The following job compiles and link-edits your callable interface application using the IBM C compiler for MVS. Some parameters might vary from one installation to the next. See your QMF administrator for details.

Figure 41. JCL for running the C compiler and linkage editor in TSO
//sampleC    JOB
//STEP1      EXEC PROC=EDCCL,LPARM='MAP'
//* Provide Access to QMF Communications Macro DSQCOMM
//COMPILE.SYSLIB   DD  DSN=QMF720.SAMPLIB,DISP=SHR
//COMPILE.SYSIN    DD  DATA,DLM='<>'
          .
          Your program or copy of QMF sample DSQABFC
          .
<>
//* Provide Access to QMF Interface Module DSQCICX
//LKED.SYSLIB   DD DSN=QMF720.SDSQLOAD,DISP=SHR
/*
 

Running your programs in TSO without ISPF

After your program has been compiled successfully, you can write a program similar to the following to run it:

Figure 42. CLIST for running your program in TSO without ISPF
PROC 0
CONTROL ASIS
/************************************************************/
/* Note: QMF, DB2, GDDM and C load libraries must be        */
/*       allocated before running this CLIST.               */
/*       Name of QMF load library is  "QMF710.SDSQLOAD".    */
/************************************************************/
/* Specify attribute list for dataset allocations           */
/************************************************************/
ATTR PRINTDCB LRECL(133) RECFM(F B A) BLKSIZE(1330)
ATTR DEBUGDCB LRECL(80)  RECFM(F B)   BLKSIZE(3120)
ATTR UDUMPDCB LRECL(125) RECFM(V B A) BLKSIZE(1632)
ATTR EDITDCB  LRECL(79)  RECFM(F B A) BLKSIZE(4029)
/************************************************************/
/* Datasets used by TSO                                     */
/************************************************************/
ALLOC FI(SYSPROC) DA('QMF720.SDSQCLTE')
ALLOC FI(SYSEXEC) DA('QMF720.SDSQEXCE')
/************************************************************/
/* QMF/GDDM Datasets                                        */
/************************************************************/
ALLOC FI(ADMGGMAP) DA('QMF720.QMFMAPS')  SHR REUSE
ALLOC FI(ADMCFORM) DA('QMF720.DSQCFORM') SHR REUSE
ALLOC FI(DSQUCFRM) DA('QMF720.DSQUCFRM') SHR REUSE
ALLOC FI(ADMSYMBL) DA('ADM.GDDMSYM')  SHR REUSE
ALLOC FI(ADMGDF)   DA('ADM.GDDM.CHARTLIB') SHR REUSE
ALLOC FI(ADMDEFS)  DA('ADM.GDDM.NICKNAME') SHR REUSE
/************************************************************/
/* Datasets used by QMF                                     */
/************************************************************/
ALLOC FI(DSQPRINT) SYSOUT(X) USING(PRINTDCB)
ALLOC FI(DSQDEBUG) SYSOUT(X) USING(DEBUGDCB)
ALLOC FI(DSQUDUMP) SYSOUT(X) USING(UDUMPDCB)
ALLOC FI(DSQSPILL) NEW UNIT(SYSDA) SPACE(1,1) TRACKS
ALLOC FI(DSQEDIT)  NEW UNIT(SYSDA) USING(EDITDCB)
ALLOC FI(DSQPNLE)  DA('QMF720.DSQPNLE') SHR REUSE
/************************************************************/
/* Start your program using TSO CALL command                */
/************************************************************/
CALL sampleC
EXIT CODE(0)

Running your programs in TSO under ISPF

After your program has been compiled successfully, you can write a program similar to the following to run it:

Figure 43. CLIST for running DSQABFC in TSO under ISPF
PROC 0
CONTROL ASIS
/************************************************************/
/* Specify attribute list for dataset allocations           */
/************************************************************/
ATTR PRINTDCB LRECL(133) RECFM(F B A) BLKSIZE(1330)
ATTR DEBUGDCB LRECL(80)  RECFM(F B)   BLKSIZE(3120)
ATTR UDUMPDCB LRECL(125) RECFM(V B A) BLKSIZE(1632)
ATTR EDITDCB  LRECL(79)  RECFM(F B A) BLKSIZE(4029)
/************************************************************/
/* Datasets used by TSO                                     */
/************************************************************/
ALLOC FI(SYSPROC) DA('QMF720.SDSQCLTE','ISR.ISRCLIB')
ALLOC FI(SYSEXEC) DA('QMF720.SDSQEXCE')
/************************************************************/
/* Datasets used by ISPF                                    */
/************************************************************/
ALLOC FI(ISPLLIB) SHR REUSE +
 
      DA('QMF720.SDSQLOAD','ADM.GDDMLOAD','DSN.DSNEXIT','DSN.DSNLOAD', +
         'EDC.SEDCLINK','PLI.SIBMLINK')
ALLOC FI(ISPMLIB) SHR REUSE +
      DA('QMF720.SDSQMLBE','ISR.ISRMLIB','ISP.ISPMLIB')
ALLOC FI(ISPPLIB) SHR REUSE +
      DA('QMF720.SDSQPLBE','ISR.ISRPLIB','ISP.ISPPLIB')
ALLOC FI(ISPSLIB) SHR REUSE +
      DA('QMF720.SDSQSLBE','ISR.ISRSLIB','ISP.ISPSLIB')
ALLOC FI(ISPTLIB) SHR REUSE +
      DA('ISR.ISRTLIB','ISP.ISPTLIB')
/************************************************************/
/* QMF/GDDM Datasets                                        */
/************************************************************/
ALLOC FI(ADMGGMAP) DA('QMF720.QMFMAPS')  SHR REUSE
ALLOC FI(ADMCFORM) DA('QMF720.DSQCFORM') SHR REUSE
ALLOC FI(DSQUCFRM) DA('QMF720.DSQUCFRM') SHR REUSE
ALLOC FI(ADMSYMBL) DA('ADM.GDDMSYM')  SHR REUSE
ALLOC FI(ADMGDF)   DA('ADM.GDDM.CHARTLIB') SHR REUSE
ALLOC FI(ADMDEFS)  DA('ADM.GDDM.NICKNAME') SHR REUSE
/************************************************************/
/* Datasets used by QMF                                     */
/************************************************************/
ALLOC FI(DSQPRINT) SYSOUT(X) USING(PRINTDCB)
ALLOC FI(DSQDEBUG) SYSOUT(X) USING(DEBUGDCB)
ALLOC FI(DSQUDUMP) SYSOUT(X) USING(UDUMPDCB)
ALLOC FI(DSQSPILL) NEW UNIT(SYSDA) SPACE(1,1) TRACKS
ALLOC FI(DSQEDIT)  NEW UNIT(SYSDA) USING(EDITDCB)
ALLOC FI(DSQPNLE)  DA('QMF720.DSQPNLE') SHR REUSE
/************************************************************/
/* Start your program as the initial ISPF dialog            */
/************************************************************/
ISPSTART PGM(sampleC) NEWAPPL(DSQE)
EXIT CODE(4)

The EXIT CODE(4) suppresses the ISPF disposition panel.

[ Previous Page | Next Page | Contents | Index ]