BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
acordes
Rhodochrosite | Level 12

the following code runs successfully when I'm inside the job

https://server-name/SASJobExecution

but fails to create those tables that pull from reffile and from the db connector when I schedule the job..

options cashost="xxxxxxxxx.xxxx.es" casport=5570;
cas;

caslib _all_ assign;

OPTIONS VALIDVARNAME=ANY;


proc casutil;
droptable casdata="testus" incaslib="mkt" quiet;
droptable casdata="_FC5PTOS" incaslib="mkt" quiet;
droptable casdata="_DIM_CONCESIONARIOS" incaslib="mkt" quiet;
run;


data mkt.testus(promote=yes);
set risknoba.the_sales;
run;

LIBNAME myora ORACLE PATH=VWFSES1P USER=SAS PASSWORD='xxxxxxxxx';

data mkt._DIM_CONCESIONARIOS(promote=yes);
set myora.DIM_CONCESIONARIOS;
run;


FILENAME REFFILE '/caslibs/marketing/FC5PTOS.TXT' encoding=latin1;
        data mkt._FC5PTOS(promote=yes)    ;
        %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
        infile REFFILE delimiter = ';' MISSOVER DSD lrecl=32767 firstobs=2 ;
           informat OPERACION $12. ;
           informat NUMCUOTA best32. ;
           informat NOMINAL commax9.2 ;
           informat "CAP. PENDIENTE"N commax9.2 ;
           informat "IMP. RECOMPRA CONCE"N commax9.2 ;
           informat "PTOS. MES"N commax9.2 ;
          informat "TOT. PUNTOS"N commax9.2 ;
          informat "PTOS. EXTRA"N commax9.2 ;
          informat "TOT. PTOS EXTRA"N commax9.2 ;
          informat VAR10 $1. ;
          format OPERACION $12. ;
          format NUMCUOTA best12. ;
          format NOMINAL commax9.2 ;
          format "CAP. PENDIENTE"N commax9.2 ;
          format "IMP. RECOMPRA CONCE"N commax9.2 ;
          format "PTOS. MES"N commax9.2 ;
          format "TOT. PUNTOS"N commax9.2 ;
          format "PTOS. EXTRA"N commax9.2 ;
          format "TOT. PTOS EXTRA"N commax9.2 ;
          format VAR10 $1. ;
       input
                   OPERACION  $
                   NUMCUOTA
                   NOMINAL
                   "CAP. PENDIENTE"N
                   "IMP. RECOMPRA CONCE"N
                   "PTOS. MES"N
                   "TOT. PUNTOS"N
                   "PTOS. EXTRA"N
                   "TOT. PTOS EXTRA"N
                   VAR10  $
       ;
       if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
       run;

 

 

1 ACCEPTED SOLUTION
2 REPLIES 2

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 376 views
  • 0 likes
  • 2 in conversation