BookmarkSubscribeRSS Feed
mchiappe83
Obsidian | Level 7

Hi Everyone,

 

I'm trying to update an ADABAS record, and I was successful by hardcoding it within the rsubmit and endrsubmit sentences.

Now, what if I want to perform that update using external data (e.g. an Oracle table)? I'm not being able to call that table between the rsubmit and endrsubmit sentences.

 

Please se my code below.

 

%let ts12=host.test.ZZZ.gov.ar 7541;
options comamid=tcp remote=ts12;
signon user="XXX" password="YYY";



rsubmit;

FILENAME DDCARD "SAS.SAS9.DDCARDT" DISP=SHR;
LIBNAME DATOS '/u/SAS/datos';


/*Elimino la estructura */

		proc delete lib=DATOS data=contrib (GENNUM=ALL) ;
		run;

		proc delete lib=DATOS data=Xcontrib (GENNUM=ALL) ;
		run;

/* Extraigo la tabla requerida*/
PROC ACCESS DBMS=ADABAS;
    CREATE DATOS.contrib.ACCESS;
    NSS(LIBRARY=SPESAS USER=CONSUSAS PASSWORD=SASPRU6);
    ADBFILE(NUM=201 DBID=18 PASSWORD=SAS1568); 
    SYSFILE(NUM=6 DBID=15 PASSWORD=SAS1568);
    SECFILE(NUM=7 DBID=15 PASSWORD=SAS1568);
    DDM='SPESERV-PADRON';
    assign=yes;
    create DATOS.contrib.VIEW;
    SELECT ALL;

    LIST VIEW;
RUN;

data datos.a ;
set datos.contrib;


proc sql;
/*select * from datos.contrib where isn = 5;*/

update datos.contrib
	set f_log_df = 20180817
	where isn = 5 ;

quit;

endrsubmit;


/*Elimino la estructura*/
%let ts12=host.test.ZZZ.gov.ar 7541;
options comamid=tcp remote=ts12;
signon user="XXX" password="YYY";

rsubmit;

FILENAME DDCARD "SAS.SAS9.DDCARDT" DISP=SHR;
LIBNAME DATOS '/u/SAS/datos';


		proc delete lib=DATOS data=contrib (GENNUM=ALL) ;
		run;

		proc delete lib=DATOS data=Xcontrib (GENNUM=ALL) ;
		run;

ENDRSUBMIT;
3 REPLIES 3
Reeza
Super User

Does your remote server have access to the Oracle DB? 

 


@mchiappe83 wrote:

Hi Everyone,

 

I'm trying to update an ADABAS record, and I was successful by hardcoding it within the rsubmit and endrsubmit sentences.

Now, what if I want to perform that update using external data (e.g. an Oracle table)? I'm not being able to call that table between the rsubmit and endrsubmit sentences.

 

Please se my code below.

 

%let ts12=host.test.ZZZ.gov.ar 7541;
options comamid=tcp remote=ts12;
signon user="XXX" password="YYY";



rsubmit;

FILENAME DDCARD "SAS.SAS9.DDCARDT" DISP=SHR;
LIBNAME DATOS '/u/SAS/datos';


/*Elimino la estructura */

		proc delete lib=DATOS data=contrib (GENNUM=ALL) ;
		run;

		proc delete lib=DATOS data=Xcontrib (GENNUM=ALL) ;
		run;

/* Extraigo la tabla requerida*/
PROC ACCESS DBMS=ADABAS;
    CREATE DATOS.contrib.ACCESS;
    NSS(LIBRARY=SPESAS USER=CONSUSAS PASSWORD=SASPRU6);
    ADBFILE(NUM=201 DBID=18 PASSWORD=SAS1568); 
    SYSFILE(NUM=6 DBID=15 PASSWORD=SAS1568);
    SECFILE(NUM=7 DBID=15 PASSWORD=SAS1568);
    DDM='SPESERV-PADRON';
    assign=yes;
    create DATOS.contrib.VIEW;
    SELECT ALL;

    LIST VIEW;
RUN;

data datos.a ;
set datos.contrib;


proc sql;
/*select * from datos.contrib where isn = 5;*/

update datos.contrib
	set f_log_df = 20180817
	where isn = 5 ;

quit;

endrsubmit;


/*Elimino la estructura*/
%let ts12=host.test.ZZZ.gov.ar 7541;
options comamid=tcp remote=ts12;
signon user="XXX" password="YYY";

rsubmit;

FILENAME DDCARD "SAS.SAS9.DDCARDT" DISP=SHR;
LIBNAME DATOS '/u/SAS/datos';


		proc delete lib=DATOS data=contrib (GENNUM=ALL) ;
		run;

		proc delete lib=DATOS data=Xcontrib (GENNUM=ALL) ;
		run;

ENDRSUBMIT;

 

LinusH
Tourmaline | Level 20

When something is not working with a code you share, also share the log. If applicable, with options applied to give diagnostic information.

Data never sleeps

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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