Previous Topic: BRANCH StatementNext Topic: A Program That Displays System Information


Exercise

Follow this procedure to write and test your TSO logon program:

  1. Activate your TSO session to test the program.
  2. Identify the program (TSOLOG1) as the startup program for your TSO session (for instructions on setting up a startup program, see "Setting Up Automatic Startup and Termination Programs").
  3. Sign off CA TPX and then sign on again. The changes you made to your user options in step 2 will not take affect until you sign off and sign on again.
  4. Activate your TSO session to test the program.

Notice that if the program, as currently written, fails to find the search string, it tries again and again, because nothing stops it from returning to the USERID label when it does not find the string "ENTER USERID" on the screen. To prevent a possible endless loop, add a loop counter to stop the program when it fails to find the target string after three attempts. Use the counter in HELLO3 as a model. To see HELLO3, see A Program That Repeats a String.

Expand the program so that it takes you to the ISPF main menu after signing you on to TSO.