Hi ,
i am trying to get last non blank record from an external file.
I tried with
filename ocmd pipe "awk '/./{line=$0} END{print line}' /vfau/vfau_sit/sit05/datain/AppDirect/Landing/APPDIRECT_PROD_2018011105.dat"
and
filename ocmd pipe "tac /vfau/vfau_sit/sit05/datain/AppDirect/Landing/APPDIRECT_PROD_2018011105.dat | egrep -m 1 ."
But our company has no Goptions accesible..and i am getting error like
ERROR 23-2: Invalid option name GOPTIONS.
25 ! GOPTIONS NOACCESSIBLE;
____________
23
ERROR: Error in the FILENAME statement.
ERROR 23-2: Invalid option name NOACCESSIBLE.
Is there any other approach?
It is like reading XXXXX from the below file.
ADJJSHJBSJJAJS
SJHDBSJSJJSJ
XXXXX
<Blankrecord>
<Blankrecord>
All SAS statements end with a semicolon ";"
you are missing this
Goptions has nothing to do with the code you are running - which is a command line command which you do need access for. You can turn goptions off to get rid of this error:
And docs:
http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#goptionschap.htm
However that will not solve your connection to the OS which may be turned off by default by your IT group - this is often the case.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.