//P2UPJ JOB --------------------------------------- <== Verify //********************************************************************* //** * //** Copyright (c) 1996 - SAS Institute, Inc. * //** Unpublished - All Rights Reserved * //** * //** Name : PDS2UPDT - utility for unloading a PDS into a file * //** suitable for intput to IEBUPDTE. * //** * //** Purpose: Demonstrate how to use the SAS/C MVS Low-Level I/O * //** functions in a real application. * //** * //** Function: Compile and linkedit source files which make up the * //** PDS2UPDT executable. * //** * //** Source : * //** - See prefix.SAMPLE.C members: * //** P2UREAD - C functions necessary to read a PDS * //** directory and construct a list of member * //** names * //** P2UPSK - C function used to construct, update, and * //** maintain a skiplist * //** UPDBLK - C functions which build the IEBUPDTE input * //** file * //** P2UPM - C main which controls execution of the * //** PDS2UPDT program * //** * //** - See prefix.SAMPLE.H members: * //** PDSMEMH - structure mapping for PDS directory entry * //** * //** PDSREADH - library includes, prototypes for static * //** functions * //** * //** P2UPMH - various global defines and public * //** function prototypes * //** * //** P2UPNODE - structure mapping for skiplist members * //** * //** P2UPSKH - various global defines and public * //** function prototypes * //** * //** UPDBLDH - various global defines and public * //** function prototypes, structure mapping * //** for SYNAD exit function and x370 abend * //** exit function * //** * //** NOTE: Ensure the statments indicated by '<==Verify' have been * //** customized for your local environment. 'prefix' is the * //** installation defined high level qualifier for the SAS/C * //** product. * //** * //* //********************************************************************* //* * //* Compile the P2UREAD function. * //* * //********************************************************************* //* //P2UREAD EXEC LC370C,PARM.C='EXT' //C.SYSLIN DD DSN=your.object.library(P2UREAD), <== Verify // DISP=SHR //C.H DD DSN=prefix.SAMPLE.H, <== Verify // DISP=SHR //C.SYSIN DD DSN=prefix.SAMPLE.C(P2UREAD), <== Verify // DISP=SHR //C.SYSPRINT DD SYSOUT=* //* //********************************************************************* //* * //* Compile the SkipList functions * //* * //********************************************************************* //* //SLFUNCS EXEC LC370C,PARM.C='EXT' //C.SYSLIN DD DSN=your.object.library(P2UPSK), <== Verify // DISP=SHR //C.H DD DSN=prefix.SAMPLE.H, <== Verify // DISP=SHR //C.SYSIN DD DSN=prefix.SAMPLE.C(P2UPSK), <== Verify // DISP=SHR //C.SYSPRINT DD SYSOUT=* //* * //********************************************************************* //* * //* Compile the compare functions that will be used by the Skiplist * //* functions * //* * //********************************************************************* //* * //COMPARE EXEC LC370C,PARM.C='EXT SNAME(P2UPSKC)' //C.SYSLIN DD DSN=your.object.library(P2UPSKCM), <== Verify // DISP=SHR //C.H DD DSN=prefix.SAMPLE.H, <== Verify // DISP=SHR //C.SYSIN DD DSN=prefix.SAMPLE.C(P2UPSKCM), <== Verify // DISP=SHR //C.SYSPRINT DD SYSOUT=* //* //********************************************************************* //* * //* Compile the function which creates the IEBUPDTE input file * //* * //********************************************************************* //* //UPDBLD EXEC LC370C, // PARM.C='EXT BITFIELD(1)' //C.SYSLIN DD DSN=your.object.library(UPDBLD), <== Verify // DISP=SHR //C.H DD DSN=prefix.SAMPLE.H, <== Verify // DISP=SHR //C.SYSIN DD DSN=prefix.SAMPLE.C(UPDBLD), <== Verify // DISP=SHR //C.SYSPRINT DD SYSOUT=* //* //********************************************************************* //* * //* Compile the C main * //* * //********************************************************************* //* //P2UPM EXEC LC370C,PARM.C='EXT' //C.SYSLIN DD DSN=your.object.library(P2UPM), <== Verify // DISP=SHR //C.H DD DSN=prefix.SAMPLE.H, <== Verify // DISP=SHR //C.SYSIN DD DSN=prefix.SAMPLE.C(P2UPM), <== Verify // DISP=SHR //C.SYSPRINT DD SYSOUT=* //* //********************************************************************* //* //* Cool/Lked the module. Cool is required due to the use of //* extended names. //* //********************************************************************* //* //COOL EXEC LC370LR,COND=(0,NE), // PARM.LKED='LIST MAP EXT' //LKED.SYSLMOD DD DSN=your.load.library, <== Verify // DISP=SHR //LKED.OBJINPT DD DSN=your.object.library, <== Verify // DISP=SHR //LKED.SYSIN DD * INCLUDE OBJINPT(P2UPM) Main INCLUDE OBJINPT(P2UPSK) SkipList functions INCLUDE OBJINPT(P2UPSKCM) SkipList compare functions INCLUDE OBJINPT(P2UREAD) Read PDS function INCLUDE OBJINPT(UPDBLD) Build IEBUPDTE file function NAME PDS2UPDT(R) Executable /* //LKED.SYSPRINT DD SYSOUT=* //* //********************************************************************* //* * //* Execute the sample, DD SYSLIB needs to be modified such that it * //* specifies a PDS. * //* * //********************************************************************* //* //GO1 EXEC PGM=PDS2UPDT,COND=(0,NE) //STEPLIB DD DSN=your.load.library, <== Verify // DISP=SHR // DD DSN=prefix.LINKLIB, SAS/C Transient <== Verify // DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTERM DD SYSOUT=* //SYSLIB DD DSN=your.input.pds, <== Verify // DISP=SHR //SYSPUNCH DD DSN=your.output.in.iebupdte.format, <== Verify // DISP=SHR //