1 /******************************************************************************/
5 /* Compile sources into modules
and link them into a service program.
*/
7 /******************************************************************************/
11 /* Configuration adjustable parameters.
*/
13 DCL VAR
(&SRCLIB
) TYPE(*CHAR
) LEN
(10) +
14 VALUE
('ZLIB'
) /* Source library.
*/
15 DCL VAR
(&SRCFILE
) TYPE(*CHAR
) LEN
(10) +
16 VALUE
('SOURCES'
) /* Source
member file.
*/
17 DCL VAR
(&CTLFILE
) TYPE(*CHAR
) LEN
(10) +
18 VALUE
('TOOLS'
) /* Control
member file.
*/
20 DCL VAR
(&MODLIB
) TYPE(*CHAR
) LEN
(10) +
21 VALUE
('ZLIB'
) /* Module library.
*/
23 DCL VAR
(&SRVLIB
) TYPE(*CHAR
) LEN
(10) +
24 VALUE
('LGPL'
) /* Service program library.
*/
26 DCL VAR
(&CFLAGS
) TYPE(*CHAR
) +
27 VALUE
('OPTIMIZE
(40)'
) /* Compile options.
*/
30 /* Working storage.
*/
32 DCL VAR
(&CMDLEN
) TYPE(*DEC
) LEN
(15 5) VALUE
(300) /* Command
length.
*/
33 DCL VAR
(&CMD
) TYPE(*CHAR
) LEN
(512)
36 /* Compile sources into modules.
*/
38 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
39 '
/ADLER32
) SRCFILE
('
*TCAT
+
40 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
41 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
42 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
44 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
45 '
/COMPRESS
) SRCFILE
('
*TCAT
+
46 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
47 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
48 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
50 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
51 '
/CRC32
) SRCFILE
('
*TCAT
+
52 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
53 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
54 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
56 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
57 '
/DEFLATE
) SRCFILE
('
*TCAT
+
58 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
59 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
60 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
62 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
63 '
/GZIO
) SRCFILE
('
*TCAT
+
64 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
65 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
66 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
68 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
69 '
/INFBACK
) SRCFILE
('
*TCAT
+
70 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
71 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
72 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
74 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
75 '
/INFFAST
) SRCFILE
('
*TCAT
+
76 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
77 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
78 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
80 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
81 '
/INFLATE
) SRCFILE
('
*TCAT
+
82 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
83 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
84 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
86 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
87 '
/INFTREES
) SRCFILE
('
*TCAT
+
88 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
89 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
90 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
92 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
93 '
/TREES
) SRCFILE
('
*TCAT
+
94 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
95 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
96 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
98 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
99 '
/UNCOMPR
) SRCFILE
('
*TCAT
+
100 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
101 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
102 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
104 CHGVAR VAR
(&CMD
) VALUE
('CRTCMOD MODULE
('
*TCAT
&MODLIB
*TCAT
+
105 '
/ZUTIL
) SRCFILE
('
*TCAT
+
106 &SRCLIB
*TCAT '
/'
*TCAT
&SRCFILE
*TCAT
+
107 '
) SYSIFCOPT
(*IFSIO
)'
*BCAT
&CFLAGS
)
108 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
111 /* Link modules into a service program.
*/
113 CRTSRVPGM SRVPGM
(&SRVLIB
/ZLIB
) +
114 MODULE
(&MODLIB
/ADLER32
&MODLIB
/COMPRESS
+
115 &MODLIB
/CRC32
&MODLIB
/DEFLATE
+
116 &MODLIB
/GZIO
&MODLIB
/INFBACK
+
117 &MODLIB
/INFFAST
&MODLIB
/INFLATE
+
118 &MODLIB
/INFTREES
&MODLIB
/TREES
+
119 &MODLIB
/UNCOMPR
&MODLIB
/ZUTIL
) +
120 SRCFILE
(&SRCLIB
/&CTLFILE
) SRCMBR
(BNDSRC
) +
121 TEXT
('ZLIB
1.2.1'
) TGTRLS
(V4R4M0
)