Help using Base SAS procedures

Sending proc sum report to HTML fine, but having issues defining axis2 order= correctly to generate the corresponding bar graph.

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Sending proc sum report to HTML fine, but having issues defining axis2 order= correctly to generate the corresponding bar graph.

I’m using proc sum to generate a report and then using gchart to send the report and a chart  to an HTML. The report is generated and sent to HTML ok.  I’m having issues defining the order= for the axis2 and have tried different syntax in the definition.  In this run I’m not specifying the constant in the for the quoted strings, as has been done for axis1. When I do more errors get generated. 

What am I am I overlooking or missing here?  I’ve searched the doc, and haven’t been able to find any examples of multiple quoted string usage.  Any specific suggestions  would would be appreciated.  Here’s the log.

  1. Thanks.

  1. Greg.

NOTE: THIS SESSION IS EXECUTING ON THE Z/OS   V02R01M00 PLATFORM.

                             WELCOME TO SAS

                                  *****

                                  *****

                      VERSION 9 RELEASE 3 MAITENANCE 2

THIS MESSAGE DISPLAYS IN THE SAS LOG WHEN THE NEWS OPTION IS SPECIFIED.

YOU CAN REPLACE IT WITH YOUR OWN MESSAGE BY EDITING THE NEWS FILE.

NOTE: THE SASUSER LIBRARY WAS NOT SPECIFIED. SASUSER LIBRARY WILL NOW BE THE SAME AS THE WORK LIBRARY.

NOTE: ALL DATA SETS AND CATALOGS IN THE SASUSER LIBRARY WILL BE DELETED AT THE END OF THE SESSION.  USE THE NOWORKTERM OPTION TO

       PREVENT THEIR DELETION.

NOTE: SAS SYSTEM OPTIONS SPECIFIED ARE:

       SORT=800 SORTSIZE=256M MEMLEAVE=256M

NOTE: 1434112K BYTES WERE AVAILABLE ABOVE THE LINE AT INITIALIZATION.

NOTE: 10216K BYTES WERE AVAILABLE BELOW THE LINE AT INITIALIZATION.

NOTE: 1171968K BYTES WERE AVAILABLE ABOVE THE LINE AFTER ADJUSTMENT FOR MEMLEAVE=256M.

NOTE: THE INITIALIZATION PHASE USED 0.02 CPU SECONDS AND 16034K.

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 17704K ABOVE THE LINE.

MXGNOTE: VMXGINIT LAST UPDATED: AUG 28, 2014. CHANGE 32.210.

ODS=AUTO AND SYSIN=SYSIN

WELCOME TO MXG SOFTWARE, FROM MERRILL CONSULTANTS, DALLAS, TEXAS

TECH SUPPORT:   214 351 1966    SUPPORT@MXG.COM    WWW.MXG.COM

MXG 32.09 DATED SEP  9, 2014 HAS BEEN SUCCESSFULLY INITIALIZED.

FILEREF= SOURCLIB

PHYSICAL NAME= MHMXG.MXGUSER.V3209.SOURCLIB

PHYSICAL NAME= MHMXG.MXG.V3209.SOURCLIB

NOTE: THERE WERE 2 OBSERVATIONS READ FROM THE DATA SET SASHELP.VEXTFL.

       WHERE UPCASE(FILEREF)='SOURCLIB';

NOTE: THE DATA STATEMENT USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:00.00

       ELAPSED TIME -         00:00:00.09

       EXCP COUNT   - 172

12                                                          THE SAS SYSTEM                              11:44 TUESDAY, MARCH 31, 2015

       TASK  MEMORY - 6193K (341K DATA, 5852K PROGRAM)

       TOTAL MEMORY - 23454K (7328K DATA, 16126K PROGRAM)

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 25176K ABOVE THE LINE.

1

2           OPTIONS SOURCE SOURCE2 SYNTAXCHECK;

3           OPTIONS NOCENTER LS=250 ERRORABEND;

4

5           ODS TRACE ON;

6

7           %PUT _AUTOMATIC_;

AUTOMATIC AFDSID 0

AUTOMATIC AFDSNAME

AUTOMATIC AFLIB

AUTOMATIC AFSTR1

AUTOMATIC AFSTR2

AUTOMATIC FSPBDV

AUTOMATIC SYSADDRBITS 32

AUTOMATIC SYSBUFFR

AUTOMATIC SYSCC 0

AUTOMATIC SYSCHARWIDTH 1

AUTOMATIC SYSCMD

AUTOMATIC SYSDATE 31MAR15

AUTOMATIC SYSDATE9 31MAR2015

AUTOMATIC SYSDAY TUESDAY

AUTOMATIC SYSDEVIC

AUTOMATIC SYSDMG 0

AUTOMATIC SYSDSN         _NULL_

AUTOMATIC SYSENCODING OPEN_ED-1047

AUTOMATIC SYSENDIAN BIG

AUTOMATIC SYSENV BACK

AUTOMATIC SYSERR 0

AUTOMATIC SYSERRORTEXT

AUTOMATIC SYSFILRC 0

AUTOMATIC SYSHOSTNAME S51

AUTOMATIC SYSINDEX 4

AUTOMATIC SYSINFO 0

AUTOMATIC SYSJOBID TSUCRLHG

AUTOMATIC SYSLAST _NULL_

AUTOMATIC SYSLCKRC 0

AUTOMATIC SYSLIBRC 0

AUTOMATIC SYSLOGAPPLNAME

AUTOMATIC SYSMACRONAME

AUTOMATIC SYSMAXLONG 2147483647

AUTOMATIC SYSMENV S

AUTOMATIC SYSMSG

AUTOMATIC SYSNCPU 5

AUTOMATIC SYSNOBS -1

AUTOMATIC SYSODSESCAPECHAR 


AUTOMATIC SYSODSPATH  SASUSER.TEMPLAT(UPDATE) SASHELP.TMPLMST(READ)

AUTOMATIC SYSPARM

AUTOMATIC SYSPBUFF

AUTOMATIC SYSPROCESSID 4867EA802368F97E4160000000000000

AUTOMATIC SYSPROCESSNAME PROGRAM SYSIN

AUTOMATIC SYSPROCNAME

AUTOMATIC SYSRC 0

AUTOMATIC SYSSCP OS

13 THE SAS SYSTEM

AUTOMATIC SYSSCPL Z/OS

AUTOMATIC SYSSITE 70070220

AUTOMATIC SYSSIZEOFLONG 4

AUTOMATIC SYSSIZEOFPTR 4

AUTOMATIC SYSSIZEOFUNICODE 2

AUTOMATIC SYSSTARTID

AUTOMATIC SYSSTARTNAME

AUTOMATIC SYSTCPIPHOSTNAME UHC51IP

AUTOMATIC SYSTIME 11:44

AUTOMATIC SYSUSERID TSUCRLH

AUTOMATIC SYSVER 9.3

AUTOMATIC SYSVLONG 9.03.01M2P081512

AUTOMATIC SYSVLONG4 9.03.01M2P08152012

AUTOMATIC SYSWARNINGTEXT

8          RUN;

9          PROC GOPTIONS AXIS NOLIST;

10         RUN;

NO AXIS STATEMENTS DEFINED.

NOTE: THE PROCEDURE GOPTIONS USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:00.00

       ELAPSED TIME -         00:00:00.03

       EXCP COUNT   - 84

       TASK  MEMORY - 3967K (4K DATA, 3963K PROGRAM)

       TOTAL MEMORY - 27491K (7584K DATA, 19907K PROGRAM)

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 29236K ABOVE THE LINE.

10       !

11

12

13          ******************************************************************;

14            DATA _NULL_ ;

15                 CALL SYMPUT ('TAG',"GREG.SMWRK3.HTMLS") ;

16                 CALL SYMPUT ('SDTE',PUT(TODAY()-364,DATE9.)) ;

17                 CALL SYMPUT ('MAXDT',PUT(TODAY()-1,DATE9.)) ;

18                 CALL SYMPUT ('MNHLQSZ',PUT(0000000,COMMA7.));

19                 CALL SYMPUT ('MXHLQSZ',PUT(2000000,COMMA7.));

20          ******************************************************************;

21

NOTE: THE DATA STATEMENT USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:00.00

       ELAPSED TIME -         00:00:00.00

       EXCP COUNT   - 22

       TASK  MEMORY - 4213K (144K DATA, 4069K PROGRAM)

       TOTAL MEMORY - 27608K (7584K DATA, 20024K PROGRAM)

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 29360K ABOVE THE LINE.

22          DATA MISCWRK;

23            FORMAT DATE DATE9.;

24            DATE = DATE();

25            RETAIN DATE;

26             SET RMM.EDGRXEXT (KEEP= RDDSSIZE RDDSNAME) ;

27             DSNAME=RDDSNAME;

28

14 THE SAS SYSTEM

29             IF RVSTATUS NE 'SCRATCH';

30             IF DSNAME NE '' THEN DO ;

31                   PERIOD = INDEX(DSNAME,".");

32                   HLQ = SUBSTR(DSNAME,1,PERIOD-1);

33                   NEXT = SUBSTR(DSNAME,PERIOD+1);

34                END ;

35             IF HLQ NE 'HSM';

36

NOTE: VARIABLE RVSTATUS IS UNINITIALIZED.

NOTE: THERE WERE 1752447 OBSERVATIONS READ FROM THE DATA SET RMM.EDGRXEXT.

NOTE: THE DATA SET WORK.MISCWRK HAS 1692463 OBSERVATIONS AND 8 VARIABLES.

NOTE: COMPRESSING DATA SET WORK.MISCWRK DECREASED SIZE BY 29.98 PERCENT.

       COMPRESSED IS 8978 PAGES; UN-COMPRESSED WOULD REQUIRE 12822 PAGES.

NOTE: THE DATA STATEMENT USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:06.31

       ELAPSED TIME -         00:00:22.56

       EXCP COUNT   - 16994

       TASK  MEMORY - 5217K (183K DATA, 5034K PROGRAM)

       TOTAL MEMORY - 30961K (10656K DATA, 20305K PROGRAM)

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 32720K ABOVE THE LINE.

37          PROC SUMMARY NWAY MISSING DATA=MISCWRK;

38              CLASS HLQ DATE;

39              VAR RDDSSIZE;

40          OUTPUT OUT=SUMPRT (DROP=_TYPE_ RENAME=(_FREQ_=COUNT))

41             SUM(RDDSSIZE) = TOT_RDDSSIZE;

42

NOTE: THERE WERE 1692463 OBSERVATIONS READ FROM THE DATA SET WORK.MISCWRK.

NOTE: THE DATA SET WORK.SUMPRT HAS 136 OBSERVATIONS AND 4 VARIABLES.

NOTE: COMPRESSING DATA SET WORK.SUMPRT INCREASED SIZE BY 100.00 PERCENT.

       COMPRESSED IS 2 PAGES; UN-COMPRESSED WOULD REQUIRE 1 PAGES.

NOTE: THE PROCEDURE SUMMARY USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:00.87

       ELAPSED TIME -         00:00:04.47

       EXCP COUNT   - 4607

       TASK  MEMORY - 4571K (114K DATA, 4457K PROGRAM)

       TOTAL MEMORY - 30859K (9760K DATA, 21099K PROGRAM)

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 34000K ABOVE THE LINE.

43          PROC SORT;

44              BY DATE HLQ;

45

46

NOTE: THERE WERE 136 OBSERVATIONS READ FROM THE DATA SET WORK.SUMPRT.

NOTE: THE DATA SET WORK.SUMPRT HAS 136 OBSERVATIONS AND 4 VARIABLES.

NOTE: COMPRESSING DATA SET WORK.SUMPRT INCREASED SIZE BY 100.00 PERCENT.

       COMPRESSED IS 2 PAGES; UN-COMPRESSED WOULD REQUIRE 1 PAGES.

NOTE: THE PROCEDURE SORT USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:00.00

       ELAPSED TIME -         00:00:00.02

       EXCP COUNT   - 40

       TASK  MEMORY - 4113K (91K DATA, 4022K PROGRAM)

       TOTAL MEMORY - 29262K (7712K DATA, 21550K PROGRAM)

15 THE SAS SYSTEM

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 34000K ABOVE THE LINE.

47         PROC PRINT NOOBS UNIFORM DATA=SUMPRT;

48              TITLE 'TAPE SUMMARY BY HIGH LEVEL QUALIFIER';

49              SUM TOT_RDDSSIZE;

50              VAR DATE HLQ COUNT TOT_RDDSSIZE ;

51              FORMAT DATE DATE9.;

52

53

54          ODS LISTING CLOSE;

55          ODS HTML PATH=ODSOUT BODY="&TAG"  STYLE=SASWEB;

NOTE: WRITING HTML BODY FILE: GREG.SMWRK3.HTMLS

56

57           GOPTIONS RESET=GLOBAL DEVICE=ACTIVEX BORDER

NOTE: PROCEDURES MIGHT NOT SUPPORT ALL OPTIONS OR STATEMENTS FOR ALL DEVICES. FOR DETAILS, SEE THE DOCUMENTATION FOR EACH PROCEDURE.

58           GUNIT=PCT HSIZE=8.42IN VSIZE=6.31IN

59           FTEXT=SIMPLEX CTEXT=BLACK HTEXT=1.8;

60

61

OUTPUT ADDED:

-------------

NAME:       PRINT

LABEL:      DATA SET WORK.SUMPRT

DATA NAME:  PROCPRINTTABLE

PATH:       PRINT.PRINT

-------------

NOTE: THERE WERE 136 OBSERVATIONS READ FROM THE DATA SET WORK.SUMPRT.

NOTE: THE PROCEDURE PRINT USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:00.09

       ELAPSED TIME -         00:00:00.63

       EXCP COUNT   - 1184

       TASK  MEMORY - 8567K (121K DATA, 8446K PROGRAM)

       TOTAL MEMORY - 42311K (15648K DATA, 26663K PROGRAM)

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 44636K ABOVE THE LINE.

62            PROC GCHART DATA=SUMPRT;

63            LEGEND1 VALUE=(HEIGHT=2.5 C=BLACK) POSITION=CENTER ACROSS=2

64              CFRAME=WH CBORDER=BLUE CSHADOW=SLATEGRAY

65              LABEL=("TYPE") MODE=PROTECT;

66             VBAR DATE / SUMVAR=TOT_RDDSSIZE DISCRETE LEGEND=LEGEND1

67             MAXIS=AXIS2;

68

69              TITLE 'DAILY GP TAPE USAGE SUMMARY BY HLQ';

70

71            AXIS1 WIDTH=2 C=BLACK      /*HORIZ DATE AXIS */

72              LABEL=(HEIGHT=2.0 COLOR=BLACK /* F=SWISS   */

73                     'DATE' J=C )

74              ORDER=("&SDTE"D TO "&MAXDT"D  BY 1)

75              VALUE=(H=2.0 COLOR=BLACK);

76

77

78            AXIS2 WIDTH=2 C=BLACK      /*VERTICAL SIZE AXIS */

79              LABEL=(HEIGHT=2.0 COLOR=BLACK /* F=SWISS   */

80                     'HLQSIZE' J=C )

16 THE SAS SYSTEM

81              ORDER=("&MNHLQSZ" TO "&MXHLQSZ" BY 1000)

                                   __

                                   22

                                   202

ERROR 22-322: SYNTAX ERROR, EXPECTING ONE OF THE FOLLOWING: A QUOTED STRING, ).

ERROR 202-322: THE OPTION OR PARAMETER IS NOT RECOGNIZED AND WILL BE IGNORED.

82              VALUE=(H=2.0 COLOR=BLACK);

83

84            RUN;

NOTE: THE PROCEDURE GCHART USED THE FOLLOWING RESOURCES:

       CPU     TIME -         00:00:00.00

       ELAPSED TIME -         00:00:00.00

       EXCP COUNT   - 17

       TASK  MEMORY - 4540K (28K DATA, 4512K PROGRAM)

       TOTAL MEMORY - 41753K (14240K DATA, 27513K PROGRAM)

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 44636K ABOVE THE LINE.

84       !

ERROR: SAS ENDED DUE TO ERRORS.

        YOU SPECIFIED: OPTIONS ERRORABEND;.

ERROR: ERRORS PRINTED ON PAGE 6.

NOTE: THE SAS SESSION USED 7.64 CPU SECONDS AND 43161K.

NOTE: THE ADDRESS SPACE HAS USED A MAXIMUM OF 940K BELOW THE LINE AND 44636K ABOVE THE LINE.

NOTE: SAS INSTITUTE INC., SAS CAMPUS DRIVE, CARY, NC USA 27513-


Accepted Solutions
Solution
‎03-31-2015 02:30 PM
Regular Contributor
Posts: 217

Re: Sending proc sum report to HTML fine, but having issues defining axis2 order= correctly to generate the corresponding bar graph.

Did you try the order = statement without the double quotes around the macro variables?  It appears that your macro variables are defined as numerics (comma7.) and your statement puts the macro variables in double quotes which makes SAS think that the macro values are character values.  If the order= statement is looking for numerics and the macro variables are resolving to character, that could be the issue.

ORDER=("&MNHLQSZ" TO "&MXHLQSZ" BY 1000)

View solution in original post


All Replies
SAS Super FREQ
Posts: 8,743

Re: Sending proc sum report to HTML fine, but having issues defining axis2 order= correctly to generate the corresponding bar graph.

Hi:

  Where in your code do you set the values for &MNHLQSZ and &MXHLQSZ ? It appears to me that they do not have values. Since you are using MXG, it seems to me that you were probably supposed to get the values for ORDER= from some prior step. Does the MXG documentation outline how these macro variables are created? The error message seems to get issued because there are no values for these 2 macro variables

ORDER=(" &MNHLQSZ " TO  " &MXHLQSZ  " BY 1000)

(which by their names seem to be a min value and a max value for the axis).

cynthia

Occasional Contributor
Posts: 5

Re: Sending proc sum report to HTML fine, but having issues defining axis2 order= correctly to generate the corresponding bar graph.

Hi Cynthia:  I had meant to include these:

DATA _NULL_ ;                                       

     CALL SYMPUT ('TAG',"GREG.SMWRK3.HTMLS") ;      

     CALL SYMPUT ('SDTE',PUT(TODAY()-364,DATE9.)) ; 

     CALL SYMPUT ('MAXDT',PUT(TODAY()-1,DATE9.)) ;  

     CALL SYMPUT ('MNHLQSZ',PUT(0000000,COMMA7.));  

     CALL SYMPUT ('MXHLQSZ',PUT(2000000,COMMA7.)); 

Solution
‎03-31-2015 02:30 PM
Regular Contributor
Posts: 217

Re: Sending proc sum report to HTML fine, but having issues defining axis2 order= correctly to generate the corresponding bar graph.

Did you try the order = statement without the double quotes around the macro variables?  It appears that your macro variables are defined as numerics (comma7.) and your statement puts the macro variables in double quotes which makes SAS think that the macro values are character values.  If the order= statement is looking for numerics and the macro variables are resolving to character, that could be the issue.

ORDER=("&MNHLQSZ" TO "&MXHLQSZ" BY 1000)

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 204 views
  • 0 likes
  • 3 in conversation