home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / IMHAPI10.ZIP / SAMPL1IM.HAP < prev    next >
Text File  |  1991-12-07  |  3KB  |  91 lines

  1. *
  2. *              SAMP1IM.HAP - Sample IMAHPI Command Script
  3. *
  4. *       This sample IMHAPI script will transfer a file from a TSO
  5. * session, after waiting until 11:00 pm.  It will log out of that session,
  6. * then wait until 8:00 am and log into multiple sessions.
  7. *       The script also shows several other IMAHPI commands, Echo (-e),
  8. * AutoWait (-a) and Protparm (-p).  It also demonstrates how to manipulate
  9. * the terminal windows by enlarging each as the sessions are started.
  10. *       Obviously, this script is specific for a given site's products
  11. * and procedures.  The script can be a model for building customized
  12. * scripts for particular circumstances.
  13. *       Please see the file IMHAPI.DOC, included with this set of files,
  14. * for more info on IMHAPI.
  15. *       Paul Firgens, December 1991
  16. *
  17.  
  18. * Turn on the AutoWait option; '-a' could also be used as the command alias.
  19. -autowait
  20. * Prompt for and catch a protected parameter which will be used
  21. * as the password; '-p' could also substitute as the command.
  22. -protparm
  23. *
  24. * Now, turn on the Echo option to watch what happens.
  25. -echo
  26.  
  27. * Wait until 11:00 pm to begin the file transfer
  28. -wait 23:00:00
  29. CONNECT_PS a
  30. SENDKEY "tso UFFDA@E"
  31. * Here the $INP$ symbol will be replaced by the protected parameter, also,
  32. * IMHAPI will wait until it finds the string 'OIDCARD' before it sends
  33. * off the SENDKEY command to EHLLAPI.
  34. SENDKEY $INP$@E * * OIDCARD
  35. SENDKEY @x * * ***
  36. DISCONNECT_PS
  37. RECEIVE_FILE "typical.dat a:'UFFDA.DATA.FILE(typical)' crlf ascii"
  38. CONNECT_PS a
  39. SENDKEY logoff@E
  40. DISCONNECT_PS
  41. * Turn off the echo for the rest of the script.
  42. -e
  43. * Show the status of the sessions and the IMHAPI options.
  44. -s
  45.  
  46. * Now, wait until 8:00 am and then login for the userid 'UFFDA'.
  47. -w 08:00:00
  48. * Start logon into TSO
  49. * In each session we'll restore the saved size of the terminal window first
  50. * then do the login.  We'll also reuse the protected password set earlier.
  51. * We've also switched from the text form of the commands to the numeric format.
  52. 101 a
  53. 104 a\c1\\s1000\
  54. 102 a
  55. 1 a
  56. 3 "tso UFFDA@E"
  57. 3 $INP$@E * * OIDCARD
  58. 2
  59.  
  60. * Leave the TSO session, since it usually takes awhile here and hop over to 
  61. * logon to a system called 'CPUMASTER'.  Later, we'll finish the TSO logon.
  62. 101 b
  63. 104 b\c1\\s1000\
  64. 102 b
  65. 1 b
  66. 3 CPUMASTER@E
  67. 3 UFFDA@T$INP$@E * * Transfer:
  68. 3 @E
  69. 2
  70.  
  71. * Now, logon to a CICS session
  72. 101 c
  73. 104 c\c1\\s1000\
  74. 102 c
  75. 1 c
  76. 3 cics@E
  77. 3 @C * * INC
  78. 3 "cesn@E"
  79. 3 "UFFDA@T$INP$@E"
  80. 3 menu@E
  81. 2
  82.  
  83. * Jump back to TSO to complete the Logon.
  84. 1 a
  85. 3 @E * * ***
  86. 3 1@E * * GDDM
  87.  
  88. * We're finished.
  89. exit
  90. 
  91.