Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get password from text file

Status
Not open for further replies.

GKatReliable

Programmer
Jul 2, 2002
45
0
0
US
I have to change some of our company's scripts to bring in a login password from an external text file, because the host system does a periodic password change and the user community does not have write access to the folder where our production scripts are kept.

After much RTFM'ing and using an example from the Aspect script help, I see that one of the best ways to handle a password is to do a macro with #DEFINE passwordvar "Rosebud^M" and then TRANSMIT passwordvar.

Well, I have a problem with the ^M.
The command to read the text file strips CR/LF's, and I am not sure how to contatenate the ^M with the variable in which I am storing the password after reading it in.

Should there perhaps be a second TRANSMIT command with just the ^M?

Regards,
Glenn Koproske
 
Yes, you can have the ^M in a separate transmit statement. There should not be any problems doing this.

There are a couple different ways to combine two or more strings into one string. Probably the best method in this case would be the strcat command.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top