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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

***** if/and ****

Status
Not open for further replies.

ARTFULDODGER1

IS-IT--Management
Jan 25, 2003
1
US
Can anyone help me?? I have Promcomm Plus 4.8. i use the aspect scripting language basically to record/edit and run tasks on my mainframe. A sample script might try to create a multiple lists and that print them. If I come up with no items present I would like the script to ignore the next command which tells it to print and continue on from another location further down. can anyone tell me how to do that. Thanks!
 
You could (and actually probably are) use the waitfor command to look for a certain string of text that is displayed during your script's operation. You can take this one step further by checking if that string was actually received, and then basing your future execution of receiving the string or not. For example, if a certain prompt is received when you wish to print, you could use a structure like this pseudocode:

if waitfor "prompt"
issue print command
else
perform error handling
endif

This tells Procomm to send the necessary commands to print only if the required string was received from the remote computer. If the string is not received, then your script could perform some sort of error handling.
aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top