BookmarkSubscribeRSS Feed
sfffdg
Obsidian | Level 7

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?

5 REPLIES 5
sfffdg
Obsidian | Level 7

It is like reading XXXXX from the below file.

 

ADJJSHJBSJJAJS

SJHDBSJSJJSJ

XXXXX

<Blankrecord>

<Blankrecord>

 

 

 

BrunoMueller
SAS Super FREQ

All SAS statements end with a semicolon ";"

 

you are missing this

sfffdg
Obsidian | Level 7
With semicolon only am getting the error as our company does not have access to goptions
BrunoMueller
SAS Super FREQ
I guess you are running this with SAS Enteprise Guide as the front end.

Please post the complete log as attachment or as a code block (the {} symbol in the editor)
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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:

https://communities.sas.com/t5/SAS-Enterprise-Guide/Turning-off-goptions-in-SAS-EG-code-node/td-p/13...

 

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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1338 views
  • 0 likes
  • 3 in conversation