<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS job schedule run successfully but not return the output (new table) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888890#M351161</link>
    <description>&lt;P&gt;You need to use an existing library for which you have write permission (talk to your SAS admins), or create one in a location where you have write permission (e.g. in your home directory on the SAS server).&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 07:28:41 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-08-11T07:28:41Z</dc:date>
    <item>
      <title>SAS job schedule run successfully but not return the output (new table)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888884#M351156</link>
      <description>&lt;P&gt;Hi SAS expert team,&lt;/P&gt;&lt;P&gt;I have scheduled a job (hourly) from a sas program to create new library and new table. This job ran successfully even when i'm not login sas, and after this job ran successfully, I login sas and cannot see the new library (CE_DATA)/newtable which should be created by the sas program.&amp;nbsp;Can anyone please explain to me what's wrong here? Many thanks.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image2.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86658iBD2DE0294DA8F909/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image2.png" alt="image2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For more information, this sas program is simply a code to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;create new library 'CE_DATA'&lt;/LI&gt;&lt;LI&gt;create connection to oracle&lt;/LI&gt;&lt;LI&gt;create new table from sql/oracle database and then do some transpose, left join&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;as below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Get data CAR credit rating from oracle*/
proc sql;    

libname CE_DATA "%sysfunc(pathname(work))";

connect to oracle as myconn 
(user="" 
password="" 
encoding="UTF8" 
path=''); 

create table CE_DATA.newtable as
select * from connection to myconn       
    (
		select  
		b.carid, b.borrowercustomercode, b.attribute, b.value

		from
		(select a.* , row_number() over (partition by a.carid order by a.carid,a.decisionid desc) row_num
		from app_ce_dh.dm_output_decision_history a) b
		
		where 1=1
		and row_num &amp;lt;=32
		and carid like 'CAR%'
		and attributegroup in ('MODEL_RESULT','DECISION')
	) ;  

disconnect from myconn; 

proc transpose data=CE_DATA.newtable out=CE_DATA.newtable2;
  by CARID BORROWERCUSTOMERCODE  ;
  id ATTRIBUTE ;
  var VALUE ;
run;

/*Get status of CAR from app_mhrr */
proc sql;    

connect to oracle as myconn 
(user="" 
password="" 
encoding="UTF8" 
path=''); 

create table CE_DATA.trangthai as
select * from connection to myconn       
    (
		select a.application_id, a.appl_status,a.Day_id,b.finalstatus 
		
		from app_mhrr.rf_dim_app_process a 
		Left join 
		(select application_id,max(day_id) as finalstatus from app_mhrr.rf_dim_app_process group by application_id) b
		on a.application_id = b.application_id and a.day_ID = b.finalstatus
		
		where b.finalstatus is not null 
		and a.application_id like 'CAR%'
		group by a.application_id, a.appl_status,a.day_id,b.finalstatus
	) ;  

disconnect from myconn; 

/*left join status of CAR*/

proc sql;
	create table final_table as
	select * from newtable2 as x left join trangthai as y
	on x.carid = y.application_id;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I ran this sas program mannually (without job schedule) and it is completed successfully, and then I saw the library and the table that I want like this screen:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image1.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86659i8B230F514CF8C289/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image1.png" alt="image1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 04:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888884#M351156</guid>
      <dc:creator>lyth_abb</dc:creator>
      <dc:date>2023-08-11T04:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job schedule run successfully but not return the output (new table)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888886#M351158</link>
      <description>&lt;P&gt;What does the log say (Maxim 2)?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 05:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888886#M351158</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-11T05:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job schedule run successfully but not return the output (new table)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888887#M351159</link>
      <description>&lt;P&gt;Oh, I see your mistake.&lt;/P&gt;
&lt;P&gt;You create the library as just another name for WORK:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname CE_DATA "%sysfunc(pathname(work))";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since the directory containing WORK is&amp;nbsp;&lt;U&gt;physically&lt;/U&gt; deleted upon termination of the SAS session, all data in it will vanish.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 06:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888887#M351159</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-11T06:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job schedule run successfully but not return the output (new table)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888888#M351160</link>
      <description>Oh I see, many thanks Kurt_Bremser , so what should be replaced for 'WORK' if I wanna keep the table created?</description>
      <pubDate>Fri, 11 Aug 2023 06:36:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888888#M351160</guid>
      <dc:creator>lyth_abb</dc:creator>
      <dc:date>2023-08-11T06:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job schedule run successfully but not return the output (new table)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888890#M351161</link>
      <description>&lt;P&gt;You need to use an existing library for which you have write permission (talk to your SAS admins), or create one in a location where you have write permission (e.g. in your home directory on the SAS server).&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 07:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/888890#M351161</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-11T07:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job schedule run successfully but not return the output (new table)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/889131#M351267</link>
      <description>many thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;, I will work on with SAS admin to sovlve this problem</description>
      <pubDate>Mon, 14 Aug 2023 03:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-job-schedule-run-successfully-but-not-return-the-output-new/m-p/889131#M351267</guid>
      <dc:creator>lyth_abb</dc:creator>
      <dc:date>2023-08-14T03:08:28Z</dc:date>
    </item>
  </channel>
</rss>

