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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.