Creating a Logon Script (Release 3.5 and below)

Return to Introduction  Previous page  Next page

One of the most common tasks for users is to logon to the host computer. This makes the logon process a good candidate for scripting. The following sample script illustrates logging on to a VM/ESA host. Use it as a starting point for automating your logon process.

 

*

z/VM Logon Script

1

waitfor

USERID:

2

type

Test

3

key

tab

4

askfor

"Enter your password and click OK",password

5

key

enter

6

exit

 

7

 

The following list describes each of the lines in this script.

 

1.Comment.

 

2.waitfor USERID: pauses the script until the characters "USERID:" appear on the emulation screen. This pause prevents the script from issuing more script commands before the host computer is ready to receive them. The parameter for the waitfor command is case sensitive. It must be typed exactly as it will appear on the emulation screen.

 

3.type Test types "Test" at the current cursor location.

 

4.key tab simulates pressing the tab key on the keyboard. This moves the cursor to the next tab stop.

 

5.askfor "Enter your password and click OK",password displays a dialog box requesting the password. The password parameter at the end of the askfor command indicates that the characters typed by the user will be displayed as asterisks, so others cannot read the password. When OK is clicked, the characters entered in the dialog are typed at the current cursor location.

 

6.key enter simulates pressing of the enter key on the keyboard. This sends the data entered on the screen to the host computer for processing.

 

7.exit exits the script.

 


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.