A. Building CICS/6000 Programs on UNIX : How You Build CICS/6000 Applications : C Applications
 
Share this page                  
C Applications
The following example illustrates the use of a makefile to add an embedded C application to the CICS/6000 environment. In this example, the application filename is “app1.sc”. To run the makefile, type the following commands:
make app1
make install
Example: makefile source
#-------------------------------------------------------------
# DEFINE VARIABLES
#-------------------------------------------------------------
II_SYSTEM=/install/65
CICSREGION=DEMO1
INGHDRS=-I$(II_SYSTEM)/ingres/files
INGLIBS=-L$(II_SYSTEM)/ingres/lib -lcompat.1 -lframe.1 -linterp.1 -lq.1
#-------------------------------------------------------------
# The embedded C PROGRAM
#-------------------------------------------------------------
app1
app1: app1.ccs
    CCFLAGS=”$(INGLIBS) -lm”; \
    export CCFLAGS; \
    cicstcl -e -d -lC app1.ccs
    rm -f app1.c
app1.ccs: app1.sc
    esqlc app1.sc
    mv app1.c app1.ccs
#-------------------------------------------------------------
# ADD CICS REGION DEFINITIONS
#-------------------------------------------------------------
install:
    cicsadd -c td -r $(CICSREGION) -P APP1 ProgName=APP1 \
        RSLCheck=none
    cicsadd -c pd -r $(CICSREGION) -P APP1 PathName=$(PWD)/app1