SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

SAS DI Status handling

Reply
Occasional Contributor
Posts: 11

SAS DI Status handling

Dear All,

 

I am trying to incorporate the status handling in that i am using the SEND ENTRY TO DATASET, i have created and registered one STATUS named dataset in that library. which is empty table having no column.

can you please tell me which column it should contains?

can you please provide sample for DATASET which i can use for building columns?

 

Thanks & Regards,

Prashant.

 

SAS Super FREQ
Posts: 682

Re: SAS DI Status handling

Hi

 

Have a look at the generated code, see example below. You will see that the dataset created has two columns:

message, character, length 80

dateTime, numeric

 

This SAS dataset is appended to the one you specified when defining the action.

 

Please make sure that the libref is available that you specified when defining the action information for the "SEND ENTRY TO DATASET". in order for you to look at the data from within Data Integration Studio, the SAS Dataset has to be registered in the Metadata.

 

 

 %macro etls_sendData(libref=, dataset=, message=); 
      
         %local etls_syntaxcheck; 
         %let etls_syntaxcheck = %sysfunc(getoption(syntaxcheck)); 
         /* Turn off syntaxcheck option to perform following steps  */ 
         options nosyntaxcheck;
      
         data work.etls_tempData; 
            length message $80; 
            message = "&message."; 
            datetime = put(datetime(),nldatm.); 
         run; 
      
         %local etls_obs; 
         %let etls_obs = %sysfunc(getoption(obs)); 
         /* Set obs option to max to perform following steps  */ 
         options obs = max;
      
         proc append base=&libref..&dataset. data=work.etls_tempData force;   run; 
      
         /* Reset obs option to previous setting  */ 
         options obs = &etls_obs; 
      
         proc datasets lib = work nolist; 
            delete etls_tempData; 
         quit;
      
         /* Reset syntaxcheck option to previous setting  */ 
         options &etls_syntaxcheck; 
      %mend etls_sendData; 
      %etls_sendData 
         (libref = ditstsrc, 
          dataset = dis_job_status, 
          Message = Successful); 

Bruno

 

Ps Have moved the discussion to the appropriate community

New Contributor
Posts: 2

Re: SAS DI Status handling

Hi

 

I have many jobs and each job needs to have status handling. I am trying to get the error message of each job into a dataset. But I am facing problems with the maximum length of error message that can be passed on to the table.

 

In the code generated, length of MESSAGE column in etls_tempData table is only 80. If i save the name of job and the error message into the message column. The error message will not be complete.

 

         data work.etls_tempData; length message $80;
            message = "&message.";
            datetime = put(datetime(),nldatm.);
         run;

                 

I was checking if there is any option to increase the length of Error Message which is passed to the Dataset.

              

Thanks,

Arjun

SAS Super FREQ
Posts: 682

Re: SAS DI Status handling

Hi in the status ahndling you can also define "custom", this will allow you to run any code you want.

 

You can model your code similar to the one used by the "SEND ENTRY TO DATASET" then you have all the flexibility you need.

 

You should package the code into a autocall macro, so you can change or extend the code without actually change the call to the macro.

 

Also have a look at the condition send job status, this might be helpful as well

 

Bruno

New Contributor
Posts: 2

Re: SAS DI Status handling

Thanks! This helps Smiley Happy

Ask a Question
Discussion stats
  • 4 replies
  • 215 views
  • 0 likes
  • 3 in conversation