home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
EASL2PRF.ZIP
/
FROMHOST.INC
< prev
next >
Wrap
Text File
|
1990-06-15
|
4KB
|
81 lines
subroutine ListHostFiles(string:HostFileName) is
copy (text of FromEF) to Keystrokes # Download the filelist
action EnterString # the PROFS screen
copy (text of ToEF) to Keystrokes
action EnterString
copy (text of SubjectEF) to Keystrokes
action EnterString
copy "DB FILE - " HostFileName " A" to Keystrokes
action EnterString
action DefineWatch # look for EPQPCPRF panel
copy "EPQPCPRF" to WatchChar # which tells us the result of
copy 2 to WatchCol # the document storage function.
copy 1 to WatchRow # the panel will display the return
copy 100 to SettleTime # code and document number
action WatchForChar
action WatchForNoX
action WatchAndWait
if (WatchGaveUp) then
# error
else
action ScanScreen
copy 29 to FieldNumber # get Document Number assigned
action ReadField
copy "Store in PROFS Complete.\n" to DocMsg
append "Doc Number: " FieldText to DocMsg
copy FieldText to PROFSDocNum
copy "EPQGO" to Keystrokes # tell EPQPCPRF goodbye
action EnterString
make BytesSentDB invisible
end if
end if
action Stop3270 # Stop the 3270 stuff
# This routine transfers the file
action TransferFromHost is # & calls other routines to read list
action Init3270 # get the list of host files
copy "LISTF * * A (EXEC" to Keystrokes
action EnterString
action DefineWatch # wait for response
copy 60 to SettleTime
action WatchForNoX
action WatchAndWait
if (WatchGaveUp) then
# error
else
# set up HostFileName and HostOptions
copy "CMS$LIST.PRN" to ChosenPCFileName
copy "CMS EXEC A " to HostFileName # build the host name VM Style
copy " (ASCII CRLF" to HostOptions # converting to ASCII
# build send command
copy ChosenPCFileName to SendCommand
append " " HostFileName to SendCommand
append " " HostOptions to SendCommand
# get ready to start a
# command processor and
# pass the RECEIVE command
# it for file transfer
copy "/C start \"ReceiveFile\" /C receive " SendCommand to Parms
start local RECEIVEFILE "cmd.exe" Parms
begin # respond to messages from
# the SEND command
response to char "File transfer is complete." from RECEIVEFILE
# add to list box
read file "CMS$LIST.PRN" into HostFileListLB
make HostFileListLB visible
stop RECEIVEFILE
leave block
response to line "TRANS03" from RECEIVEFILE
copy ReplyToMessage(" ","File Transfer Complete",MessageOK,1,MessageIconExclamation) to TempX
stop RECEIVEFILE
leave block
response to line "TRANS026" from RECEIVEFILE # bad message from RECEIVE
copy ReplyToMessage(" ","File Transfer returned message TRANS026",MessageOK,1,MessageIconExclamation) to TempX
stop RECEIVEFILE
leave block
response to char "Number of" from RECEIVEFILE
end