11-13-2015
sasbeginner_us
Calcite | Level 5
Member since
02-04-2015
- 17 Posts
- 1 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by sasbeginner_us
Subject Views Posted 1130 11-12-2015 04:09 PM 1943 11-12-2015 04:03 PM 1945 11-12-2015 03:59 PM 1998 11-10-2015 04:40 PM 1544 10-08-2015 04:09 PM 1982 06-25-2015 10:44 AM 1982 04-29-2015 04:34 PM 1982 04-29-2015 11:56 AM 2072 04-29-2015 10:23 AM 1056 02-11-2015 11:16 AM -
Activity Feed for sasbeginner_us
- Posted SAS return code is not returned properly to Unix on SAS Programming. 11-12-2015 04:09 PM
- Posted Re: Convert Datetime to ddMONyyyybhh:mm:ss format on SAS Programming. 11-12-2015 04:03 PM
- Liked Re: Convert Datetime to ddMONyyyybhh:mm:ss format for FreelanceReinh. 11-12-2015 04:00 PM
- Posted Re: Convert Datetime to ddMONyyyybhh:mm:ss format on SAS Programming. 11-12-2015 03:59 PM
- Posted Convert Datetime to ddMONyyyybhh:mm:ss format on SAS Programming. 11-10-2015 04:40 PM
- Posted Re: Problem reading csv files. (Some records are wrapped). on SAS Programming. 10-08-2015 04:09 PM
- Posted Re: libname function not disconnecting on SAS Programming. 06-25-2015 10:44 AM
- Posted Re: libname function not disconnecting on SAS Programming. 04-29-2015 04:34 PM
- Posted Re: libname function not disconnecting on SAS Programming. 04-29-2015 11:56 AM
- Posted libname function not disconnecting on SAS Programming. 04-29-2015 10:23 AM
- Posted Re: Query_band in libname on SAS Programming. 02-11-2015 11:16 AM
- Posted Query_band in libname on SAS Programming. 02-10-2015 04:52 PM
- Posted Re: Counting missing and non missing at column level on SAS Procedures. 02-09-2015 09:52 AM
- Posted Counting missing and non missing at column level on SAS Procedures. 02-05-2015 05:59 PM
-
Posts I Liked
Subject Likes Author Latest Post 1
11-12-2015
04:09 PM
Hi,
I am calling a sas program from ksh script (inside a while do loop) and have the below code to capture the sas return code but it is not working. The sas code failed in a proc sql statement but returned 0 to ksh. Please let me know what is wrong here..
ksh:
------
sas ${sas_path}/test.sas \ -sysparm "$name $date " \ -log $log_path/test.log.${name}.${rundatetime} \ -print $log_path/test.lst.${name}.${rundatetime} wait rc_sas=$?
if [[ $rc_sas -ge 3 ]] then echo $rc_sas print "see file"
sas log:
----------
ERROR: Teradata prepare: An owner referenced by user does not have SELECT WITH GRANT OPTION access
ksh log:
----------
+ wait + rc_sas=0 + [[ 0 -ge 3 ]]
... View more
11-12-2015
04:03 PM
Thank you all, I used the substr and it is working. My understanding is that substr will extract partial text, Could you pls explain how the subtr works in this case ?
... View more
11-12-2015
03:59 PM
thank u all for the repsonse. Used the substr and it is working.
My understanding is that substr will extract partial text, Could you please explain how it works in this case ?
... View more
11-10-2015
04:40 PM
Hi, I need to convert the current datetime into ddMONyyyybhh:mm:ss format.
For example - if the current time is - 11/10/2015 04:36:12
expected result - 10NOV2015 04:36:12
Tried the below, but need the blank space between year and hour, Please help me..
test=put(datetime(),datetime19.);
... View more
10-08-2015
04:09 PM
I have similar scenario - we get a csv file where some records are wrapped and spanned over couple of lines, instead of single line.
Also, some of this wrapped lines do not have CRLF, so TERMSTR option is not working. I dont think we can change anything on the source side. Please see some sample recs below, record starts with 50001 is first record, Next record is 60001. I added CRLF just to show how it looks. Is there anyway we can process/ read the file ?
50001,"1233243411","LN","2015-06-05-11.29.14.339000","Please consider this as the text on page 1. CRLF Please provide copy of the page, with date and location, for testing purporse
hardship.",,"X","845783457FSDF","453454HJGHGHGJ",,CRLF
60001,"1234567897","LC","2015-03-05-11.29.14.339000","We receive some xt",,'T', ","845783457FSDF","453454HJGHGHGJ",CRLF
it is a comma delimited file -
infile "filename06.csv" delimiter = "," MISSOVER DSD lrecl=32767
end=last ;
... View more
06-25-2015
10:44 AM
Hi, I know it is an advacned function but I am trying to put a fix to this existing code. The problem with the above stmt is that it is not disconnecting from teradata as this code loops till a certain time. I tried to use rc_libname = libname(teradata_libname); to disconnect but getting an error "ERROR: Unable to clear or re-assign the library TERAlib_ because it is still in use.". Please assist me in this.
... View more
04-29-2015
11:56 AM
Thank you... i will check this. Can you please explain me what dsid=open() does ? is it like a read/select statement but it wont establish a connection ?
... View more
04-29-2015
10:23 AM
Hi, We have a libname function as below and it is connecting & provides 0 return code. But the problem is, it is not disconnecting (i think), it leaves idle sessions on the teradata side. Just want to know what exactly this function does ? whether it connects & disconnects to/from teradata ? or Do i need to explicitly specify how to disconnect from teradata ? rc_libname = libname(teradata_libname, ,unix_engine , " server='&com_dbserver' schema='&com_db' user='"||trim(teradata_userid)||"' password='"||trim(teradata_password)||"'" ); To add to that, we have a dsid function statements after rc_libname return code check... not sure if it impacts the teradata connection.. dsid=open(trim(teradata_libname)||"."||trim(teradata_table)||trim(teradata_where), "IS"); rc_close = close(dsid); Thanks in advance..
... View more
02-10-2015
04:52 PM
Hi, I have a libname stmt to connect to teradata and I need to add the Query_band option to it. I am trying as below but getting error: How do i use query_band here ? libname test_conn teradata schema=&db server=&dbserver sessions=1 user="&dbuid" password="&dbpw" UTILCONN_TRANSIENT=YES QUERY_BAND="UtilityDataSize=SMALL"; Error log: 2065 user="&dbuid" TERADATA_0: Executed: on connection 0 SET QUERY_BAND='UtilityDataSize=SMALL' UPDATE FOR SESSION; 2066 password="&dbpw" 2067 X UTILCONN_TRANSIENT=YES 2068 QUERY_BAND="UtilityDataSize=SMALL"; ERROR: Error in processing session query band: A syntax error was found in the QUERY_BAND ERROR: Error in the LIBNAME statement.
... View more
02-09-2015
09:52 AM
Thank you for your quick reply. Unfortunately, we dont have 9.4, use only 9.3
... View more
02-05-2015
05:59 PM
Hi, I am a SAS beginner level developer..I have a sas dataset as below, and have close to 100 columns like this including char and numeric types. Need to calculate number of missing and non-missing for each of this column and create a sas dataset as in expected output. Please assist me if we can do this using proc freq... obs open_date desc_code open_amt 1 02-02-2011 AAC 2900 2 04-02-2000 TEST1 09.00 3 03-09-2014 . 1000 4 05-03-2001 . . 5 . ESS 300 Expected output : column_name non-missing missing_cnt open_date 4 1 desc_code 3 2 open_amt 4 1 thanks in advance...
... View more