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

I am trying to create an SAS DI job for following code by making use of SAS existing transformation.

so i tried with new-->external file/Delimited/user written file reading options but none of them are having options to read or pass the file options from unix section in SAS DI.

can anyone please suggest any idea on this request ?

 

filename cccc pipe 'df -g | tail +2' lrecl=32767;
data cccc ;
infile cccc truncover;
input;
infile=compbl(_infile_);
run;
1 ACCEPTED SOLUTION
4 REPLIES 4
LinusH
Tourmaline | Level 20

Not sure exactly what problem you are facing. At least in my Linux env I had to change the tail syntax (tail -n 2). Once done I get the desired (?) output from File Reader.

LinusH_0-1599636611501.png

 

Data never sleeps
JJP1
Pyrite | Level 9

Thanks @LinusH ,

How can i put the command df -g | tail in file please using SAS DI so that as you showed i can use file reader transformation to read the file.

yes this is what ia m expecting.

would you please help how you created df -g node (file node) in provided screen shot please ?

i tried with external file,delimited file options using SAS DI but not able to find options clearly.

so how do i create the file (df -g | tail ) please ? so that i can use file reader transformation to read same ?

JJP1
Pyrite | Level 9
Thanks @LinusH i am not getting the option to paste the code and it is asking for file parameters to pass,
may i know how you created the file please (options please) i tried with following
new --->external-->delimited file/user written/fixed width options al,l i tried but none of them are allowing me to paste the code. please suggest

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
  • 4 replies
  • 1615 views
  • 2 likes
  • 2 in conversation