IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Run this using SAS?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
san_icse
Currently Banned

New User


Joined: 11 May 2007
Posts: 11
Location: India

PostPosted: Thu Mar 06, 2008 7:57 pm
Reply with quote

I have a jcl to run using SAS. I need to generate a report from this.

Please have a look on JCL and tell me what I should add more in this and where I am doing mistakes.

Code:

//STEP03   EXEC SAS,TIME=120
//SYSIN    DD *                                                   
  TITLE1 'BATCH WORKLOAD DETAIL';                                 
* **************************;                                     
  OPTIONS NOCENTER DATE LABEL NONUMBER SOURCE SOURCE2 LINESIZE=132;
  DATA TEMP;                                                       
       SET PDB.TYPE30_5;                                           
       IF CPUTCBTM GT 0;                                           
       SDATE=DATEPART(JINITIME);                                   
       STIME=TIMEPART(JINITIME);                                   
       SHOUR=HOUR(STIME);                                         
       EDATE=DATEPART(JTRMTIME);                                   
       ETIME=TIMEPART(JTRMTIME);                                   
       FORMAT  PROJ ¢4.                                           
               EXCPTOTL COMMA12.0 ;                               
       PROJ = SUBSTR(JOB,2,4) ;                                   
     IF PROJ EQ '0684';                                           
       TOTCPUTM = (CPUTCBTM + CPUSRBTM + CPUIIPTM + CPUHPTTM +     
                    CPURCTTM);                                 
               IF TOTCPUTM GT 0;                               
               FORMAT EXCPTOTL COMMA10.;                       
               FORMAT TOTCPUTM TIME11.2;                       
               FORMAT TOTCPUTM COMMA10.;                       
               FORMAT SDATE MMDDYY8.;                           
               FORMAT EDATE MMDDYY8.;                           
               FORMAT STIME TIME11.2;                           
               FORMAT ETIME TIME11.2;                           
   PROC SORT DATA=TEMP;                                         
 *      BY JOB;                                                 
        BY DESCENDING TOTCPUTM;                                 
   DATA TEMP2;                                                 
        SET TEMP;                                               
 * PROC PRINT;                                                 
   PROC PRINT  DATA=TEMP2 ROUND NOOBS UNIFORM SPLIT='*';       
        VAR    SYSTEM JESNR JOB TOTCPUTM EXCPTOTL               
              SDATE STIME ETIME EDATE ACTIVETM;     
       SUM    TOTCPUTM;                             
       LABEL  SDATE    = 'START*DATE';               
       LABEL  STIME    = 'START*TIME';               
       LABEL  EDATE    = 'END*DATE';                 
       LABEL  ETIME    = 'END*TIME';                 
       LABEL  ACTIVETM = 'ACTIVE*TIME';             
       LABEL  JESNR    = 'JOB*NUMBER';               
       LABEL  JOB      = 'JOB*NAME';                 
       LABEL  TOTCPUTM = 'CPU*TIME';                 
       LABEL  EXCPTOTL = 'EXCP*COUNT';               
/*                                                   
//
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 06, 2008 8:14 pm
Reply with quote

Obviously something is going wrong because you are posting on the forum.

Come on, give us a clue and post your SASLOG output.
Also learn how to use the VB tags to make your output easily readable.

Although TITLE1 'BATCH WORKLOAD DETAIL'; should be part of the PROC PRINT methinks.
Back to top
View user's profile Send private message
san_icse
Currently Banned

New User


Joined: 11 May 2007
Posts: 11
Location: India

PostPosted: Fri Mar 07, 2008 12:43 pm
Reply with quote

Hi , This my SASLOG output.


Code:

********************************* TOP OF DATA **********************************
                                                                               
  Welcome to the SAS Information Delivery System,                               
                                                                               
        888       888     Release 8.2!                                         
       8   8     8   8                                                         
              8   8         8                                                         
               8 8          8    This message displays in the SAS log when             
                8          8     the NEWS option is specified. You can                 
         88    8 8        8      replace it with your own message by editing           
        8  8  8   8      8       the NEWS file.                                       
        8     8   8  8  8                                                             
        8      888   8  88888                                                         
                                                                                       
                                                                                       
                                                                                       
       NOTE: The SASUSER library was not specified. SASUSER library will now be the sam
       NOTE: All data sets and catalogs in the SASUSER library will be deleted at the e
             prevent their deletion.                                                   
                                                                                       
       NOTE: SAS system options specified are:                                         
      SORT=4                                                                   
                                                                                 
 NOTE: The initialization phase used 0.03 CPU seconds and 7660K.                 
 1            TITLE1 'BATCH WORKLOAD DETAIL';                                   
 2          * **************************;                                       
 3            OPTIONS NOCENTER DATE LABEL NONUMBER SOURCE SOURCE2 LINESIZE=132; 
 4            DATA TEMP;                                                         
 5                 SET PDB.TYPE30_5;                                             
 ERROR: Libname PDB is not assigned.                                             
 ERROR: Libname PDB is not assigned.                                             
 ERROR: Libname PDB is not assigned.                                             
 6                 IF CPUTCBTM GT 0;                                             
 7                 SDATE=DATEPART(JINITIME);                                     
 8                 STIME=TIMEPART(JINITIME);                                     
 9                 SHOUR=HOUR(STIME);                                           
 10                EDATE=DATEPART(JTRMTIME);                                     
 11                ETIME=TIMEPART(JTRMTIME);                                     
12                FORMAT  PROJ ¢4.                                             
                               ___                                             
                               ___                                             
                               ___                                             
                               31                                               
                               31                                               
                               31                                               
ERROR 31-185: Format ¢4. is unknown.                                           
ERROR 31-185: Format ¢4. is unknown.                                           
ERROR 31-185: Format ¢4. is unknown.                                           
                                                                               
13                        EXCPTOTL COMMA12.0 ;                                 
14                PROJ = SUBSTR(JOB,2,4) ;                                     
15              IF PROJ EQ '0684';                                             
16                TOTCPUTM = (CPUTCBTM + CPUSRBTM + CPUIIPTM + CPUHPTTM +       
17                            CPURCTTM);                                       
18                       IF TOTCPUTM GT 0;                                     
19                       FORMAT EXCPTOTL COMMA10.;                             
20                       FORMAT TOTCPUTM TIME11.2;                             
21                       FORMAT TOTCPUTM COMMA10.;                             
The SAS System                                                                 
                                                                               
22                       FORMAT SDATE MMDDYY8.;                               
23                       FORMAT EDATE MMDDYY8.;                               
24                       FORMAT STIME TIME11.2;                               
25                       FORMAT ETIME TIME11.2;                               
                                                                               
NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
NOTE: The SAS System stopped processing this step because of errors.           
NOTE: SAS set option OBS=0 and will continue to check statements. This may cause NOTE: No observations in data set.       

WARNING: The data set WORK.TEMP may be incomplete.  When this step was stopped there were 0 observations and 16 variables.
NOTE: The DATA statement used 0.01 CPU seconds and 8450K.             
                                                                       
                                                                       
 26           PROC SORT DATA=TEMP;                                     
 27         *      BY JOB;                                             
 28                BY DESCENDING TOTCPUTM;                             
                                                                       
 NOTE: The PROCEDURE SORT used 0.00 CPU seconds and 8516K.             
                                                                       
 29           DATA TEMP2;                                               
 30                SET TEMP;                                           
 31         * PROC PRINT;                                               
                                                                       
 NOTE: The data set WORK.TEMP2 has 0 observations and 16 variables.     
 NOTE: The DATA statement used 0.00 CPU seconds and 8516K.             
                                                                       
 32           PROC PRINT  DATA=TEMP2 ROUND NOOBS UNIFORM SPLIT='*';     
 33                VAR    SYSTEM JESNR JOB TOTCPUTM EXCPTOTL           
 ERROR: Variable SYSTEM not found.                                       
 ERROR: Variable SYSTEM not found.                                       
 ERROR: Variable SYSTEM not found.                                       
 ERROR: Variable JESNR not found.                                       
 ERROR: Variable JESNR not found.                                       
 ERROR: Variable JESNR not found.                                       
 34                       SDATE STIME ETIME EDATE ACTIVETM;             
 ERROR: Variable ACTIVETM not found.                                     
 ERROR: Variable ACTIVETM not found.                                     
 ERROR: Variable ACTIVETM not found.                                     
 35                SUM    TOTCPUTM;                                     
 36                LABEL  SDATE    = 'START*DATE';                       
 37                LABEL  STIME    = 'START*TIME';                       
 38                LABEL  EDATE    = 'END*DATE';                         
 39                LABEL  ETIME    = 'END*TIME';                         
 40                LABEL  ACTIVETM = 'ACTIVE*TIME';                     
41                LABEL  JESNR    = 'JOB*NUMBER';                       
42                LABEL  JOB      = 'JOB*NAME';                         
43                LABEL  TOTCPUTM = 'CPU*TIME';                         
44                LABEL  EXCPTOTL = 'EXCP*COUNT';                       
NOTE: The SAS System stopped processing this step because of errors.     
NOTE: The PROCEDURE PRINT used 0.00 CPU seconds and 8612K.               
                                                                         
NOTE: The SAS session used 0.04 CPU seconds and 8612K.                   
ERROR: Errors printed on pages 1,2.                                     
ERROR: Errors printed on pages 1,2.                                     
ERROR: Errors printed on pages 1,2.                                     
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Mar 07, 2008 12:49 pm
Reply with quote

Have you considered actually allocating the PDB dd name ?

I would guess that the use of a ¢ sign is not recognised as a valid format identifier, try $ (dollar) or £ (pound) - these are the only two that I have ever had to use.

Surely these errors are self explanitory ? aren't they ?
Back to top
View user's profile Send private message
san_icse
Currently Banned

New User


Joined: 11 May 2007
Posts: 11
Location: India

PostPosted: Fri Mar 07, 2008 7:05 pm
Reply with quote

Hi Expat,

Thanks for replying.

The error for ¢ sign is no more now when I replaced it with $.
Since I dont have any knowledge on SAS hence not getting the solution to resolve these errors.

I know only this is for running against the CA View (jobs) database and generates a report with vital statistics of CPU Time, Elapsed time etc...

If you know more about it or sugges some more to make this job run. It would be a great help for me.

Thanks.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Mar 07, 2008 7:13 pm
Reply with quote

Quote:
Have you considered actually allocating the PDB dd name ?

You still need to allocate your input dataset to DDname PDB
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Search our Forums:

Back to Top