&TRACE OFF

* Compile sample program

* Note that there used to a problem with PDPCLIB that
* caused RECFM=U records to be padded to the maximum
* blocksize with NULs. Now that that has been fixed, we
* can set this to 32760 to allow the maximum theoretical
* blocksize. However, in the TDF we hold the blocksize
* to 32720 so that an application that is expecting to
* get F80 records can send it up via the same TDF definition.

* For the output file, we restrict it to 32720 in case
* some processing program finds it easier to deal with
* F80 datasets and we happen to be writing a multiple
* of 80.

* Note that CMS only supports RECFM=U for tapes, not disks.

FILEDEF INPUT TAP1 (LRECL 0 BLKSIZE 32760 RECFM U
MVSUNZIP DD:INPUT A
FILEDEF INPUT CLEAR

COPY PDPTOP MAC A PDPTOP COPY = (REPLACE LRECL 80 RECFM F
COPY PDPMAIN MAC A PDPMAIN COPY = (REPLACE LRECL 80 RECFM F

COPY PDPPRLG MAC A = MACRO = (REPLACE LRECL 80 RECFM F
COPY PDPEPIL MAC A = MACRO = (REPLACE LRECL 80 RECFM F

MACLIB GEN PDPMAC PDPPRLG PDPEPIL PDPTOP PDPMAIN
GLOBAL MACLIB OSMACRO DMSGPI PDPMAC
&ASMNAME = ASMAHL

COPY * S A = ASSEMBLE = (REPLACE LRECL 80 RECFM F
COPY * ASM A = ASSEMBLE = (REPLACE LRECL 80 RECFM F

&ASMNAME CMSSTART
&ASMNAME CMSSUPA
&ASMNAME START
&ASMNAME STDIO
&ASMNAME STDLIB
&ASMNAME CTYPE
&ASMNAME STRING
&ASMNAME TIME
&ASMNAME ERRNO
&ASMNAME ASSERT
&ASMNAME LOCALE
&ASMNAME MATH
&ASMNAME SETJMP
&ASMNAME SIGNAL
&ASMNAME __MEMMGR
&ASMNAME PDPTEST

&STACK HT
LOAD    CMSSTART (NOLIBE NOAUTO
INCLUDE START (NOLIBE NOAUTO
INCLUDE CMSSUPA (NOLIBE NOAUTO
INCLUDE STDIO (NOLIBE NOAUTO
INCLUDE STDLIB (NOLIBE NOAUTO
INCLUDE CTYPE (NOLIBE NOAUTO
INCLUDE STRING (NOLIBE NOAUTO
INCLUDE TIME (NOLIBE NOAUTO
INCLUDE ERRNO (NOLIBE NOAUTO
INCLUDE ASSERT (NOLIBE NOAUTO
INCLUDE LOCALE (NOLIBE NOAUTO
INCLUDE MATH (NOLIBE NOAUTO
INCLUDE SETJMP (NOLIBE NOAUTO
INCLUDE SIGNAL (NOLIBE NOAUTO
INCLUDE __MEMMGR (NOLIBE NOAUTO
&STACK RT
INCLUDE PDPTEST (NOLIBE NOAUTO

GENMOD PDPTEST
* TYPE LOAD MAP A
ERASE LOAD MAP A

PDPTEST aBc DeFghijklmn

FILEDEF OUTPUT TAP2 (LRECL 0 BLKSIZE 32720 RECFM U
CPYFIL -bb "CMSSUPA TEXT A" dd:output
FILEDEF OUTPUT CLEAR
