04-18-2019
sas_9
Obsidian | Level 7
Member since
10-30-2011
- 231 Posts
- 3 Likes Given
- 0 Solutions
- 15 Likes Received
-
Latest posts by sas_9
Subject Views Posted 495 04-17-2019 02:50 PM 9952 04-17-2019 02:21 PM 9997 04-16-2019 01:06 PM 10011 04-16-2019 12:05 PM 10021 04-16-2019 11:31 AM 10041 04-16-2019 10:37 AM 2761 02-18-2018 05:55 PM 2792 02-17-2018 11:30 AM 2823 02-16-2018 10:28 PM 2848 02-16-2018 06:36 PM -
Activity Feed for sas_9
- Posted Re: How do I read multiple space delimited file? on SAS Programming. 04-17-2019 02:50 PM
- Posted Re: How do I read multiple space delimited file? on SAS Programming. 04-17-2019 02:21 PM
- Posted Re: How do I read multiple space delimited file? on SAS Programming. 04-16-2019 01:06 PM
- Posted Re: How do I read multiple space delimited file? on SAS Programming. 04-16-2019 12:05 PM
- Posted Re: How do I read multiple space delimited file? on SAS Programming. 04-16-2019 11:31 AM
- Posted How do I read multiple space delimited file? on SAS Programming. 04-16-2019 10:37 AM
- Posted Re: long var with multiple delimiter on SAS Enterprise Guide. 02-18-2018 05:55 PM
- Posted Re: long var with multiple delimiter on SAS Enterprise Guide. 02-17-2018 11:30 AM
- Posted Re: long var with multiple delimiter on SAS Enterprise Guide. 02-16-2018 10:28 PM
- Posted Re: long var with multiple delimiter on SAS Enterprise Guide. 02-16-2018 06:36 PM
- Posted long var with multiple delimiter on SAS Enterprise Guide. 02-16-2018 05:35 PM
- Got a Like for Re: "An error occurred executing the workspace job". 10-11-2017 11:01 AM
- Got a Like for Re: How to Write a SAS Dataset to a Pipe Delimited Text File (Not Using PROC EXPORT). 06-21-2017 03:58 PM
- Liked Re: starting/stopping services on grid for JuanS_OCS. 11-02-2016 09:02 AM
- Posted Re: SAS email help on Administration and Deployment. 03-15-2016 11:23 AM
- Posted Re: SAS email help on Administration and Deployment. 03-14-2016 07:28 PM
- Posted SAS email help on Administration and Deployment. 03-14-2016 04:21 PM
- Got a Like for Re: How to ODBC SQL Server with multiple database?. 02-12-2016 11:32 AM
- Got a Like for Re: If I Pre-Assign an Oracle Library with the Management Console, It disappear in EGuide. 09-01-2015 04:24 AM
- Got a Like for Re: How to ODBC SQL Server with multiple database?. 09-01-2015 04:24 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 2 1 -
My Liked Posts
Subject Likes Posted 1 06-10-2013 07:39 PM 1 07-11-2014 05:16 PM 1 01-09-2013 03:21 PM 3 12-18-2012 05:08 PM 3 01-09-2013 10:07 AM
04-17-2019
02:50 PM
thanks for input Tom. I am going to validate it against "wc -l test.txt" file within code.
... View more
04-17-2019
02:21 PM
Thanks to all.
Thank you Tom, yes its output of ls -ltr command in text file.
It worked. so I had to adjust length. what I did is defined specific length for each variable in length statement and then defined formatted input with same length for each variable and it turn out fine.
Have multiple space in between some values (like value1 value2 value3).
data want;
infile "/dir/test.txt" firsobs=2 truncover;
length
var1 $11
var2 $2
var3 $12
.
filename $256
;
input
var1 $11.
var2 $2.
var3 $12.
.
filename $256.
;
run;
... View more
04-16-2019
01:06 PM
thanks Shmuel but this is not returning any value,,,empty sas dataset
data test; length record $500.; infile "cd /dir-path-to-file; ls -ltr > /temp/test.txt;" pipe; input; record= _infile_; length var1 $10 var2 $2 var3 $10 ..... var8 $10 var9 $200; var1 = scan(record,1); var2 = scan(record,2) var3 = scan(record,3); ... var8 = scan(record,8); var9 = scan(record,9); run;
... View more
04-16-2019
12:05 PM
so output file is like same as I mentioned in first post. only things is, it has multiple space in between some values.
-rw-rw-r--. 1 user1 user1 205373 Jan 7 16:33 filename-with-hyphen.txt
-rw-rw-r--. 1 user2 user2 185907 Jan 7 16:33 filename_with_underscore.txt
-rw-rw-r--. 1 xyzabcuser xyzabcuser 131995 Jan 18 15:36 sasdataset.with.dor.sas7bdat
when I use above code, output is this,
var1 var2 var3 var4 var5 var6 var7 var8 var9
-rw-rw-r-- 1 user1 -rw-rw-r-- 1 user2 -rw-rw-r-- 1 xyzabcuser xyzabcuser
... View more
04-16-2019
11:31 AM
text file structure is same as I mentioned, and this is the full code so far,
data _null_;
length record $500.;
infile "cd /dir-path-to-file; ls -ltr > /temp/test.txt;" pipe;
input;
record= _infile_;
run;
data in;
infile "/temp/test.txt" dsd dlm=' ' firstobs=2;
input
var1 :$10.
var2 :$2.
var3 :$10.
var4 :$10.
var5 :$10.
var6 :$5.
var7 :$2.
var8 :$10.
var9 :$200.
;
run;
... View more
04-16-2019
10:37 AM
i have text file output like below from linux command and wants to read it into sas.
i tried defining length statement for each variable (and making all values as char) but not reading in fine. i also tried defining informat in length statement for each value (var1 :$10. var2 :$1.) but still not reading it fine.
please help...
-rw-rw-r--. 1 user1 user1 205373 Jan 7 16:33 filename-with-hyphen.txt
-rw-rw-r--. 1 user2 user2 185907 Jan 7 16:33 filename_with_underscore.txt
-rw-rw-r--. 1 xyzabcuser xyzabcuser 131995 Jan 18 15:36 sasdataset.with.dor.sas7bdat
... View more
02-17-2018
11:30 AM
Thanks Patrick. All lines in log file start with "JOB_<USERID>" and ends with that huge string which has -METAPASS 86896JKJHGJUHVBHB (-METAPASS and encrypted password), so that is a start and end point for each record.
... View more
02-16-2018
10:28 PM
Thanks Patrick - infect i am reading one log file which has user executed job details and in that file (each value is separated by space) there are two long strings which i want to represent appropriately (sample attached). File has character strings In quotation mark. However, here, first string contains all in one quotation mark but second string is really long string which contains multiple quotation mark + different sign in between (like - / '@', etc..) but all the time it ends with like -> -METAPASS 74785249857DSJVBSDJHB"
I am not that familiar with SAS EVM but this would be a big plus for me whenever user stats require, Thank you.
... View more
02-16-2018
06:36 PM
so VARIABLE1 and VARIABLE2 should look like (2 variables with one observation)
VARIABLE1
"SAS Enterprise Guide_SASApp - Workspace Server_70784B87-149E-AE47-BCE0-B331CF4E6EFF"
VARIABLE2
"SAS Enterprise Guide_SASApp - Workspace Server_123456jsdjh-12rfg-grr-BCE0-DSLKFMLKDS" "/SAS/WORKSPACE/SERVER/DIR/WorkspaceServer.sh -noterminal -noxcmd -netencryptalgorithm AES -metaserver servername.com -metaport 123456 -metarepository Foundation -locale en_US -objectserver -objectserverparms ""delayconn sph=servername.com protocol=bridge 6.852563 4700 0 -1 0 0 1894 0 0 0 32 -1 0 0 0 515049 4 -1 "" "default" 9 1 "" "" 0 1441792 0 "" "" "" "" 0 "" 15 "" -1 "/userid" "" "" "" -1 "" "" 16 "" 1511905439 "" "" 0 0 -1 0 362496 "select[type == any] order[r15s g] " "" -1 "" -1 0 "" 0 0 "" 2508 "" 0 "" 0.000000 0.00 0.00 0.00 0.00 1 "servername.com"
Thank you -
... View more
02-16-2018
05:35 PM
how would I read two strangers below as 2 separate variable?
"SAS Enterprise Guide_SASApp - Workspace Server_70784B87-149E-AE47-BCE0-B331CF4E6EFF"
"SAS Enterprise Guide_SASApp - Workspace Server_123456jsdjh-12rfg-grr-BCE0-DSLKFMLKDS" "/SAS/WORKSPACE/SERVER/DIR/WorkspaceServer.sh -noterminal -noxcmd -netencryptalgorithm AES -metaserver servername.com -metaport 123456 -metarepository Foundation -locale en_US -objectserver -objectserverparms ""delayconn sph=servername.com protocol=bridge 6.852563 4700 0 -1 0 0 1894 0 0 0 32 -1 0 0 0 515049 4 -1 "" "default" 9 1 "" "" 0 1441792 0 "" "" "" "" 0 "" 15 "" -1 "/userid" "" "" "" -1 "" "" 16 "" 1511905439 "" "" 0 0 -1 0 362496 "select[type == any] order[r15s:pg] " "" -1 "" -1 0 "" 0 0 "" 2508 "" 0 "" 0.000000 0.00 0.00 0.00 0.00 1 "servername.com"
... View more
03-14-2016
07:28 PM
Thanks Juan.
You are right, i mixed up two things somehow 🙂
For second issue, infect i checked those options but they are designed appropriately as mentioned in that link microsoft docs. Not sure what else we can do. Will wait if someone coming up with something else. Appreciate your reply back.
... View more
03-14-2016
04:21 PM
Hello Friend,
i am using 9.4 SAS base and our email set up for SAS is SMTP. i runnning some code in batch mode which supposed to attach excel file and send email to client server email id. However i am receiving error like "Error: Error opening attachment file \\servername\testdir\test.xls".
If i run code manually i am receiving below error.
"No microsoft Outllok profiles have been created. In microsoft windows, click start button, and then click control panel. clocl user accouints and then click maikl.. Click show profiles, and then click add"
This seems something needs to be dome from MS office set up, i followed few steps but didn't work it out. Can someone please help. Thanks!
... View more
03-09-2015
06:09 PM
Yes none application opening along with EG. Just was wonder what's going on - but if it's not related to sas then will contact them. Thanks Kiwi
... View more