Yes, the program has OPTIONS MAUTOSOURCE;
At the risk of going overboard, I'm pasting below the JCL and the SAS log, minus some irrelevant steps.
JCL:
Note where the system proc points to the system autocall library AUTOLIB, and the line where I point to my macro library, both highlighted.
1 //GJDC1PME JOB (T-6288-00,C451),'CARPENTER',
// CLASS=T,
// NOTIFY=GJDC1,
// MSGCLASS=Q,
// TYPRUN=HOLD,
// MSGLEVEL=(1,0)
2 //PDEF OUTPUT PAGEDEF=06080,CHARS=GT15
3 //JS10 EXEC PROC=SASPRD,WORK='100,10',SORT=50,COPIES=1
4 XXSASPRD PROC ENTRY=SASB,
XX CONFIG=NULLFILE,
XX LOAD='*.NULLPDS,VOL=REF=*.NULLPDS',
XX SASAUTO='*.NULLPDS,VOL=REF=*.NULLPDS',
XX OPTIONS=,
XX SORT=4,
XX COPIES=1,
XX WORK='5,3'
XX*********************************************************************
XX* PRODUCT: MVS SAS RELEASE 9.1.3 **
XX* SAS PRODUCTION PROC **
XX*********************************************************************
5 XXSAS913 EXEC PGM=&ENTRY,PARM='SORT=&SORT &OPTIONS',REGION=4096K
IEFC653I SUBSTITUTION JCL - PGM=SASB,PARM='SORT=50 ',REGION=4096K
6 XXNULLPDS DD DISP=(MOD,PASS),DSN=&&NULLPDS,UNIT=DISKW,
XX SPACE=(TRK,(1,1,1)),DCB=BLKSIZE=6160
7 XXSTEPLIB DD DISP=(SHR,PASS),DSN=&LOAD
IEFC653I SUBSTITUTION JCL - DISP=(SHR,PASS),DSN=*.NULLPDS,VOL=REF=*.NULLPDS
8 XX DD DISP=SHR,DSN=SYS3.SAS.GEN.LIBRARY
XX** UNCOMMENT/SUPPLY YOUR DSN IF YOU NEED TO CONCATENATE SORT LIB
XX** DD DISP=SHR,DSN=SYS1.SORT.LINKLIB
9 XXSASEXEC DD DISP=SHR,DSN=&CONFIG
IEFC653I SUBSTITUTION JCL - DISP=SHR,DSN=NULLFILE
10 XXCONFIG DD DISP=SHR,DSN=SYS3.SAS.GEN.CNTL(BAT1920)
11 XXSASAUTOS DD DISP=(SHR,PASS),DSN=&SASAUTO
IEFC653I SUBSTITUTION JCL - DISP=(SHR,PASS),DSN=*.NULLPDS,VOL=REF=*.NULLPDS
12 XX DD DISP=SHR,DSN=SYS3.SAS.GEN.AUTOLIB
13 XXSASHELP DD DISP=SHR,DSN=SYS3.SAS.GEN.SASHELP
14 XXSASMSG DD DISP=SHR,DSN=SYS3.SAS.GEN.SASMSG
15 XXZIP DD DSN=SYS3.SAS.COUNTIES,DISP=SHR
16 XXWORK DD UNIT=DISKW,SPACE=(CYL,(&WORK),,,ROUND),
XX DCB=(RECFM=FS,LRECL=6144,BLKSIZE=6144,DSORG=PS)
IEFC653I SUBSTITUTION JCL - UNIT=DISKW,SPACE=(CYL,(100,10),,,ROUND),DCB=(RECF
DSORG=PS)
17 XXSASLOG DD SYSOUT=*
18 //SASLIST DD SYSOUT=*,OUTPUT=*.PDEF
X/SASLIST DD SYSOUT=*
19 XXSASPARM DD UNIT=DISKW,SPACE=(400,(100,300)),
XX DCB=(RECFM=FB,LRECL=80,BLKSIZE=400,BUFNO=1)
20 XXSYSUDUMP DD SYSOUT=*
21 XXSAS3287 DD SYSOUT=(N,SASWTR),COPIES=&COPIES
XX** ADD A LINE LIKE THE FOLLOWING TO CREATE A MACHINE-READABLE DUMP
XX*SYSMDUMP DD DSN=DUMP,UNIT=SYSDA,DISP=(NEW,CATLG),SPACE=(TRK,(20,5))
//*** SAS DATA LIBRAR(IES)
IEFC653I SUBSTITUTION JCL - SYSOUT=(N,SASWTR),COPIES=1
22 //SASUSER DD DSN=GJDC1.SAS,DISP=OLD
23 //SASLIB DD DUMMY SAS FORMAT
//*** LOCATION OF MACRO LIBRAR(IES)
24 //MYMACRO DD DSN=TEST.USRA.OMIS.SASMACRO,DISP=SHR
//*ASAUTOS DD DSN=SYS3.SAS.GEN.AUTOLIB,DISP=SHR
//*** POLICY MASTER EXTRACT FILE(S)
//*OLEXTR DD DSN=USR.UIC.EMACCVPM(0),DISP=SHR CURRENT MONTHLY
//* DD DSN=USR.UIC.EMCPCVPM(0),DISP=SHR CURRENT PURGE YTD
//* DD DSN=USR.UIC.EATPCVPM(0),DISP=SHR TOTAL PURGE
//*OLEXTR DD DSN=CLA.APM.AWCOVPME(0),DISP=SHR CURRENT WEEKLY
25 //POLEXTR DD DSN=GJDC1.PMCREAT(-0),DISP=SHR INPUT MAIN FILE
26 //DATADLM DD DSN=GJDC1.DATA.TXT(+1), OUTPUT TEXT FILE
// UNIT=DISKT,SPACE=(TRK,(500,100),RLSE),
// DISP=(NEW,CATLG,CATLG),
// DCB=(LRECL=600,BLKSIZE=,RECFM=FB)
//*OLEXTR DD DUMMY
27 //SYSIN DD *
SAS log:
Note that the macro on line 28 works properly. Later, my macro CSV1 calls system macro TRIM, which fails.
NOTE: The initialization phase used 0.11 CPU seconds and 12694K.
NOTE: The address space has used a maximum of 656K below the line and 13728K abo
NOTE: AUTOEXEC processing beginning; file is NULLFILE.
NOTE: AUTOEXEC processing completed.
1 *--------------------------------------------------------------------
...skipping comments...
15 OPTION VALIDVARNAME=V7; /* ENABLE LONG VARIABLE NAMES */
16 OPTIONS ERRORS=2;
17 *PTIONS OBS=10; /* LIMIT NUMBER OF INPUT ROWS TO READ */
18 OPTIONS MAUTOSOURCE; /* ENABLE THE USE OF MACROS IN SASAUTOS */
19 OPTIONS NOMPRINT; /* PRINT MACRO STATEMENTS */
20 OPTIONS SASAUTOS=(MYMACRO,SASAUTOS);
21 OPTION MRECALL;
22
23
24 DATA WORK.TXFER;
25
26 * FOLLOWING MACRO READS THE POLICY MASTER EXTRACT INTO A SAS DATA SET
27 OPTIONS NOMPRINT;
28 %PMEV2;
29
30 *IF SUBSTR(POLICYNO,10,1) = '5';
31 *IF PREM_EFF_DATE GE '01MAR2009'D AND
32 PREM_EFF_DATE LE '30APR2010'D;
33 *IF GAAP_CODE NE '30'-'39';
34 *IF BILL_STAT LE '40';
35 *IF COV_EFF_DATE GE '01JAN2006'D;
36
NOTE: The infile POLEXTR is:
Dsname=GJDC1.PMCREAT.G0102V00,
Unit=3390,Volume=TSO920,Disp=SHR,Blksize=27600,
Lrecl=600,Recfm=FB
NOTE: 45 records were read from the infile POLEXTR.
NOTE: The data set WORK.TXFER has 45 observations and 101 variables.
NOTE: The DATA statement used 0.16 CPU seconds and 14872K.
...skipping additional data steps and procs...
81 %CSV1(DATASET=WORK.POLCSV, /* DATASET TO WRITE
82 FILENAME=DATADLM, /* DDNAME OF THE FILE TO WRITE
83 DLMR="05"X, /* DELIMITER BETWEEN VALUES
84 QTES="YES", /* QUOTE ALL CHARACTER VARIABLES?
85 HEADER="YES", /* HEADER LINE WITH COLUMN NAMES?
86 LABEL="YES"); /* USE LABELS INSTEAD OF VAR NAMES?
NOTE: The PROCEDURE CONTENTS printed pages 1-2.
NOTE: The PROCEDURE CONTENTS used 0.06 CPU seconds and 15710K.
NOTE: The address space has used a maximum of 656K below the line and 16780K abo
NOTE: The data set WORK.___OUT_ has 32 observations and 40 variables.
NOTE: The PROCEDURE CONTENTS used 0.02 CPU seconds and 15710K.
NOTE: The address space has used a maximum of 656K below the line and 16780K abo
4 The SAS Syst
NOTE: The PROCEDURE CONTENTS printed pages 3-4.
NOTE: There were 32 observations read from the data set WORK.___OUT_.
NOTE: The data set WORK.___OUT_ has 32 observations and 40 variables.
NOTE: The PROCEDURE SORT used 0.00 CPU seconds and 15710K.
NOTE: The address space has used a maximum of 656K below the line and 16780K abo
NOTE: Numeric values have been converted to character values at the places given
86:245
NOTE: There were 32 observations read from the data set WORK.___OUT_.
NOTE: The DATA statement used 0.01 CPU seconds and 15739K.
NOTE: The address space has used a maximum of 656K below the line and 16816K abo
NOTE: Autocall member, TRIM, has not been compiled by the macro processor. It ma
name as the member. To autocall this member again, set OPTION MRECALL.
WARNING: The quoted string currently being processed has become more than 262 ch
ERROR: A character operand was found in the %EVAL function or %IF condition wher
ERROR: A character operand was found in the %EVAL function or %IF condition wher
ERROR: A character operand was found in the %EVAL function or %IF condition wher
ERROR: The %TO value of the %DO I loop is invalid.
ERROR: The %TO value of the %DO I loop is invalid.
ERROR: The %TO value of the %DO I loop is invalid.
ERROR: The macro CSV1 will stop executing.