BookmarkSubscribeRSS Feed
Aditi24
Obsidian | Level 7

Hi,

 

I am making a script in which the program have to store the credentials of the user so that is could be passed to a Java API for further execution. I am using the below script to get the input:-

 

%window info 
#1 @2 'MODSPACE LOGIN:' attr=highlight 
#5 @5 'Please enter userid:' 
#5 @26 user 20 attr=underline 
#7 @5 'Please enter password:' 
#7 @28 pass 20 attr=underline display=no; 

%display info; 

After that I have to call the tcpunix.scr file to login to the remote server. Now the script prompts its own authentication screen for input and I don't want that. I want the input that I've got using the above code to be passed to the script. Please let me know if there is a way. It will be much helpful.

1 REPLY 1
Kurt_Bremser
Super User

There are lines in the script file that use the input statement to obtain the credentials.

I would make a copy of the tcpunix.scr file that makes it easy (through comments) to identify those lines.

Then use a scripted editor to replace the lines with input with a type statement that supplies userid and password, and save to a new file.

Run that new script file when connecting.

Remove that script file immediately after signing off, for safety reasons.

Look if using proc pwencode makes sense to at least obscure the passwords.

 

I haven't found anything that lets the calling SAS process supply parameters to the scriptfile, or I would have used that.

sas-innovate-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 925 views
  • 0 likes
  • 2 in conversation