The second example is a variation of the first example. The purpose of this example is to show how easy it is to build an application with both XPLINK and IPA. To simplify the options even more, this example will not generate any listings. Please refer to the appropriate sections of Example 1. all C parts to map the given names to the members of the SCCNSAM data set.
c89 -c -2 -WI,NOOBJECT -Wc,XPLINK,GOFF hello1.c hello2.c hello3.c
For
the IPA link step, the changes are similar to the compile step, and
the basic changes that must be done to use XPLINK under z/OS® UNIX System Services. The option -Wl,XPLINK is added to guide c89 to include the XPLINK libraries in the
IPA link step.
c89 -2 -WI,LEVEL\(2\) -Wl,XPLINK -o hello hello1.o
hello2.o hello3.o
//USERID1A JOB (127A,0329),'$MEM$',
// MSGLEVEL=(2,0),MSGCLASS=S,CLASS=A,
// NOTIFY=USERID1,REGION=1024M
//PROC JCLLIB ORDER=(CBC.SCCNPRC)
//*--------------------------------------------------------------------
//* IPA compile step for hello1.c
//*--------------------------------------------------------------------
//C001F336 EXEC EDCC,
// INFILE='USERID1.IPA.SOURCE(HELLO1)',
// OUTFILE='USERID1.IPA.OBJECT(HELLOX1),DISP=SHR',
// CPARM='OPTFILE(DD:OPTIONS)'
//OPTIONS DD *
IPA(NOOBJECT) RENT LONG OPT(2) XPLINK GOFF
/*
//*--------------------------------------------------------------------
//* IPA compile step for hello2.c
//*--------------------------------------------------------------------
//C001F336 EXEC EDCC,
// INFILE='USERID1.IPA.SOURCE(HELLO2)',
// OUTFILE='USERID1.IPA.OBJECT(HELLOX2),DISP=SHR',
// CPARM='OPTFILE(DD:OPTIONS)'
//OPTIONS DD *
IPA(NOOBJECT) RENT LONG OPT(2) XPLINK GOFF
/*
//*--------------------------------------------------------------------
//* IPA compile step for hello3.c
//*--------------------------------------------------------------------
//C001F336 EXEC EDCC,
// INFILE='USERID1.IPA.SOURCE(HELLO3)',
// OUTFILE='USERID1.IPA.OBJECT(HELLOX3),DISP=SHR',
// CPARM='OPTFILE(DD:OPTIONS)'
//OPTIONS DD *
IPA(NOOBJECT) RENT LONG OPT(2) XPLINK GOFF
/*
//*--------------------------------------------------------------------
//* IPA link step for the hello module
//*--------------------------------------------------------------------
//C001F336 EXEC EDCXI,
// OUTFILE='USERID1.IPALINK.OBJECT(HELLOXP),DISP=SHR',
// IPARM='OPTFILE(DD:OPTIONS)'
//* The following line sets up an input file that just includes all
//* the IPA compile step object files.
//SYSIN DD DATA,DLM='/>'
INCLUDE OBJECT(HELLOX1,HELLOX2,HELLOX3)
INCLUDE SYSLIB(CELHS003,CELHS001)
/>
//* These are the options used
//OPTIONS DD DATA,DLM='/>'
IPA(LINK,LEVEL(2)) OPT(2) RENT LONGNAME
XPLINK GOFF
/>
//* The following line gives the object library
//OBJECT DD DSN=USERID1.IPA.OBJECT,DISP=SHR