home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
rxhll.zip
/
HOSTTSO.REX
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-11-19
|
2KB
|
86 lines
/* #include <HostTSO.rex> */
HostTSOLogon: procedure expose Host.
/**
*** This will log the use on to the host.
**/
call HostLogonClMenu
if Host.Logmode = '' then
Logmode = ''
else
Logmode = 'M('Host.Logmode')'
rc = hllapi('Sendkey', '/L' Host.Applid Host.Userid Logmode'@E')
rc = hllapi('Wait')
do while Host.Password = ''
say 'Enter the password for' Host.Applid '['Host.Application']'
Host.Password = GetNoEcho()
end
say "Logging on."
/* Respond to the password prompts */
select
when Host.Security = 'ACF2' then
call HostACF2Logon
when Host.Security = 'RACF' then
call HostRACFLogon
otherwise
call HostError 1004
end /* select */
/* At this point, we should be logged on to TSO and we should have */
/* received the TSO signon and operator messages. */
/* Keep pressing enter past the signon message until we get to the */
/* ISPF main menu. */
ISPF = 0
do until ISPF = 1
code = hllapi('Sendkey', '@E')
code = hllapi('Wait')
/* There is no string to wait for and the keyboard is unlocked, so we */
/* have to just slow the loop. */
call SysSleep 2
call HostScreenToStem
if pos('PRIMARY OPTION', Screen.1) > 0 then
ISPF = 1
end /* do until */
return
HostACF2Logon: procedure expose Host.
/**
*** This will respond to the ACF/2 password prompts
**/
code = HostWaitFor(20, 'PASSWORD')
rc = hllapi('Sendkey', Host.Password"@E")
return
HostRACFLogon: procedure expose Host.
/**
*** This will respond to the RACF password prompts
**/
say "Not Implemented yet. Do it manually"
'@pause'
return
HostTSOLogoff: procedure expose Host.
/**
*** This will logoff of TSO from the main ISPF/PDF panel
**/
rc = hllapi('Sendkey', "@0=X@E")
rc = hllapi('Wait')
rc = hllapi('Sendkey', "LOGOFF@E")
rc = hllapi('Wait')
return