The AR370 Archive Utility |
This section describes how to use the AR370 archive
utility in batch mode under OS/390.
The AR370 cataloged
procedure is used to run the AR370
utility under OS/390 batch. The job shown in Sample AR370 Archive Utility Batch Job adds four object files from two OS/390 data
sets to an AR370 archive and displays the archive information on the new members
on SYSPRINT.
Sample AR370 Archive Utility Batch Job
//RUNAR370 JOB job card information...
//GO EXEC AR370,PARM.AR='RTV'
//AR.SYSARLIB DD DISP=OLD,DSN=userid.PROJ.AR
//AR.SYSIN DD *
INCLUDE MYOBJ(mem1,mem2,mem3)
INCLUDE HEROBJ
//MYOBJ DD DISP=SHR,DSN=userid.PROJ.OBJ
//HEROBJ DD DISP=SHR,DSN=group.LEADER.OBJ(mem)
The JCL for the AR370 procedure shown in JCL for AR370 Cataloged Procedure is correct as of the publication
of this guide. However, it may be subject to change.
JCL for AR370 Cataloged Procedure
//AR370 PROC
//****************************************************************
//* NAME: AR370 (AR370) ***
//* PRODUCT: SAS/C ***
//* PROCEDURE: OBJECT CODE ARCHIVAL ***
//* DOCUMENTATION: TECHNICAL REPORT C-112 ***
//* FROM: SAS INSTITUTE INC., SAS CAMPUS DRIVE, CARY, NC ***
//****************************************************************
//*
//AR EXEC PGM=AR370#
//STEPLIB DD DISP=SHR, COMPILER LIBRARY
// DSN=SASC.LOAD
// DD DISP=SHR, RUNTIME LIBRARY
// DSN=SASC.LINKLIB
//SYSPRINT DD SYSOUT=A
//SYSTERM DD SYSOUT=A
//SYSARWRK DD UNIT=SYSDA,SPACE=(CYL,(2,1))
If you choose to write your own JCL to run AR370 under
OS/390, some or all of the following data definitions are required.
Additional DD statements are required if referenced
by SYSIN INCLUDE statements.
Under OS/390 batch, the syntax for the AR370 PARM string
is as follows:
cmds [files_prefix] [posname] [memname ...]
cmds must be present. It is specified as a string of command
characters and modifier characters. These specifications are the same as
for the AR370 utility under CMS, as described previously in Command Characters and
Optional Modifier Characters with the following exception:
- CAUTION:
- Specify the Member Name
Under
OS/390 batch, if you specify
x
without also specifying the member
names, the members are extracted to the same flat file. Each extracted member
is overwritten by the following extracted member, and at completion, the flat
file will contain only the last extracted member. ![[cautionend]](../common/images/cautend.gif)
Additionally, OS/390 supports a command modifier character
of
f
, which specifies the use of a DDname prefix by the AR370 utility.
files_prefix is required
only if the
f
command modifier character is specified. The prefix
can contain from one to three characters. The prefix then replaces the string
SYS in all AR370 DDnames (except for SYSTERM, which is defined by the C library
as the standard error file).
posname specifies the name
of a specific archive member and is required only if one of the relative positioning
command modifiers (
a
or
b
) is specified.
memname specifies the members
of the archive to be processed. Member names must be specified exactly as
they appear in the archive.
When the
r
command character is
specified, AR370 reads SYSIN for INCLUDE statements that specify the locations
of new or replacement archive members. The format of the INCLUDE statement
is the following:
INCLUDE ddname [(member [,member])]
where
the ddname may be allocated to a sequential data
set, a PDS, or a member of a PDS. For example:
-
INCLUDE COBJ
-
may refer to a sequential data set or one
specific member of a PDS.
-
INCLUDE COBJ(MEM)
-
refers to member MEM of a PDS.
-
INCLUDE COBJ(MEM1,MEM2)
-
refers to members MEM1 and MEM2 of a PDS.
In OS/390 when a member is added to (or replaced in)
an AR370 archive, the archive member name is determined from the name of the
input file. If the input file is a PDS member, the archive member name is
the same as the PDS member name. Otherwise, the archive member name is formed
from the last two qualifiers of the input data set name.
If you need an archive member name different from the
name that the AR370 utility would select by default, you can use the "replace
as" feature of AR370. This feature lets you attach an archive member name
to a DDname or member specification using the equal sign (=). For example:
INCLUDE COBJ:MEM2.OBJ
INCLUDE COBJ(MEM1=#BAZ,QUUX=*WOBBLE*)
The first of these statements stores the contents of
the COBJ DDname as member MEM2.OBJ of the archive. The second of these two
statements stores member MEM1 of the COBJ PDS as archive member #BAZ and PDS
member QUUX as archive member *WOBBLE*.
The OS/390 JCL procedure LC370CA runs the compiler and
stores the resulting object module in an AR370 archive. This procedure is
useful if you are using extended names and want to have references to the
compiled module resolved automatically by COOL. See Sample JCL for Compiling with Procedure LC370CA for typical JCL to run LC370CA.
Sample JCL for Compiling with Procedure LC370CA
//COMPILE JOB job card information
//*--------------------------------
//* COMPILE A C PROGRAM AND STORE OBJECT IN AR-LIBRARY
//* REPLACE GENERIC NAMES AS APPROPRIATE
//*--------------------------------
//STEP1 EXEC LC370CA,PARM.C='options',
// MEMBER=ar-member
//C.SYSIN DD DISP=SHR,DSN=your.source.library(member)
//C.libddn DD DISP=SHR,DSN=your.macro.library
//A.SYSARLIB DD DISP=OLD,DSN=your.ar.archive
//
When you use LC370CA, you only need to provide DD cards
for SYSIN (your source data set) and SYSARLIB (your output AR370 archive).
You must also specify the MEMBER= option to specify the member name under
which the object code should be stored in the output archive. This name must
be a valid OS/390 PDS member name.
The LC370CA procedure contains the JCL shown in Expanded JCL for LC370CA. This JCL
is correct as of the publication of this report. However, it may be subject
to change.
Expanded JCL for LC370CA
//LC370CA PROC MEMBER=DO.NOT.OMIT
//****************************************************************
//* PRODUCT: SAS/C ***
//* PROCEDURE: COMPILATION ***
//* DOCUMENTATION: SAS/C COMPILER AND LIBRARY USER'S GUIDE ***
//* FROM: SAS INSTITUTE INC., SAS CAMPUS DRIVE, CARY, NC ***
//****************************************************************
//*
//C EXEC PGM=LC370B
//STEPLIB DD DSN=SASC.LINKLIB,
// DISP=SHR RUNTIME LIBRARY
// DD DSN=SASC.LOAD,
// DISP=SHR COMPILER LIBRARY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSUT2 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSUT3 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSLIN DD DSN=&&OBJECT(&MEMBER),SPACE=(3200,(10,10,1)),
// DISP=(NEW,PASS),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=80,DSORG=PO)
//SYSLIB DD DSN=SASC.MACLIBC,
// DISP=SHR STANDARD MACRO LIBRARY
//SYSDBLIB DD DSN=&&DBGLIB,SPACE=(4080,(20,20,1)),DISP=(,PASS),
// UNIT=SYSDA,DCB=(RECFM=U,BLKSIZE=4080)
//SYSTMP01 DD UNIT=SYSDA,SPACE=(TRK,25) VS1 ONLY
//SYSTMP02 DD UNIT=SYSDA,SPACE=(TRK,25) VS1 ONLY
//A EXEC PGM=AR370#,PARM=R,
// COND=(4,LT,C)
//STEPLIB DD DSN=SASC.LOAD,
// DISP=SHR COMPILER LIBRARY
// DD DSN=SASC.LINKLIB,
// DISP=SHR RUNTIME LIBRARY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSARLIB DD DSN=&&AR,SPACE=(4080,(10,10)),
// DISP=(NEW,PASS),UNIT=SYSDA
//OBJECT DD DSN=*.C.SYSLIN,VOL=REF=*.C.SYSLIN,DISP=(OLD,PASS)
//SYSIN DD DSN=SASC.BASEOBJ(AR@OBJ),
// DISP=SHR
The procedure LCCCPCA preprocesses and compiles a C
program for CICS and stores the resulting object module in an AR370 archive.
This procedure is useful if you are using extended names and want to have
references to the compiled module resolved automatically by COOL. See Sample JCL for Compiling with Procedure LCCCPCA for typical
JCL to run LCCCPCA.
Sample JCL for Compiling with Procedure LCCCPCA
//COMPILE JOB job card information
//*--------------------------------
//* PREPROCESS AND COMPILE A C PROGRAM FOR CICS
//* AND STORE OBJECT IN AR-LIBRARY
//* REPLACE GENERIC NAMES AS APPROPRIATE
//*--------------------------------
//STEP1 EXEC LCCCPCA,PARM.C='options',
// MEMBER=ar-member
//CCP.SYSIN DD DISP=SHR,DSN=your.source.library(member)
//C.libddn DD DISP=SHR,DSN=your.macro.library
//A.SYSARLIB DD DISP=OLD,DSN=your.ar.archive
//
When you use LCCCPCA, you only need to provide DD cards
for SYSIN (your source data set) and SYSARLIB (your output AR370 archive).
You must also use the MEMBER= option to specify the member name under which
the object code should be stored in the output archive. This name must be
a valid OS/390 PDS member name.
The LCCCPCA procedure contains the JCL shown in Expanded JCL for LCCCPCA. This JCL
is correct as of the publication of this report. However, it may be subject
to change.
Expanded JCL for LCCCPCA
//LCCCPCA PROC MEMBER=DO.NOT.OMIT
//****************************************************************
//* NAME: LCCCPCA (LCCCPCA) ***
//* SUPPORT: C COMPILER DIVISION ***
//* PRODUCT: SAS/C ***
//* PROCEDURE: CICS TRANSLATION/COMPILATION ***
//* DOCUMENTATION: SAS/C CICS USER'S GUIDE ***
//* FROM: SAS INSTITUTE INC., SAS CAMPUS DRIVE, CARY, NC ***
//****************************************************************
//*
//CCP EXEC PGM=LCCCP0,REGION=1536K
//STEPLIB DD DSN=SASC.LINKLIB,
// DISP=SHR RUNTIME LIBRARY
// DD DSN=SASC.LOAD,
// DISP=SHR TRANSLATOR LIBRARY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=A,DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210)
//SYSPUNCH DD UNIT=SYSDA,DSN=&&CPPOUT,DISP=(NEW,PASS),
// SPACE=(TRK,(5,5)),DCB=(RECFM=VB,LRECL=259)
//C EXEC PGM=LC370B,PARM='RENT',COND=(8,LT,CCP)
//STEPLIB DD DSN=SASC.LINKLIB,
// DISP=SHR RUNTIME LIBRARY
// DD DSN=SASC.LOAD,
// DISP=SHR COMPILER LIBRARY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSUT2 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSUT3 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSLIN DD DSN=&&OBJECT(&MEMBER),SPACE=(3200,(10,10,1)),
// DISP=(NEW,PASS),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=80,DSORG=PO)
//SYSLIB DD DSN=SASC.MACLIBC,
// DISP=SHR STANDARD MACRO LIBRARY
//SYSDBLIB DD DSN=&&DBGLIB,SPACE=(4080,(20,20,1)),DISP=(,PASS),
// UNIT=SYSDA,DCB=(RECFM=U,BLKSIZE=4080)
//SYSTMP01 DD UNIT=SYSDA,SPACE=(TRK,25) VS1 ONLY
//SYSTMP02 DD UNIT=SYSDA,SPACE=(TRK,25) VS1 ONLY
//SYSIN DD DSN=*.CCP.SYSPUNCH,DISP=(OLD,DELETE,DELETE),
// VOL=REF=*.CCP.SYSPUNCH
//A EXEC PGM=AR370#,PARM=R,
// COND=((4,LT,CCP),(4,LT,C))
//STEPLIB DD DSN=SASC.LOAD,
// DISP=SHR COMPILER LIBRARY
// DD DSN=SASC.LINKLIB,
// DISP=SHR RUNTIME LIBRARY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSARLIB DD DSN=&&AR,SPACE=(4080,(10,10)),
// DISP=(NEW,PASS),UNIT=SYSDA
//OBJECT DD DSN=*.C.SYSLIN,VOL=REF=*.C.SYSLIN,DISP=(OLD,PASS)
//SYSIN DD DSN=SASC.BASEOBJ(AR@OBJ),
// DISP=SHR
Copyright © 2001
by SAS Institute Inc., Cary, NC, USA. All rights reserved.