home *** CD-ROM | disk | FTP | other *** search
- /* This is a rexx macro to send stuff from the Amiga to an IBM using VLT */
-
- if ~showlist('l','rexxarplib.library') then address command addrexxlib
-
- host = address()
-
- ft = 'temp'
- fm = 'a'
-
- msgstring = " This routine sends a file to \"
- msgstring = msgstring||" the IBM mainframe. To select \"
- msgstring = msgstring||" a file to send simply use the \"
- msgstring = msgstring||" file requestor up above. \"
- msgstring = msgstring||" If you hit CANCEL the transfer \"
- msgstring = msgstring||" terminates. The same happens \"
- msgstring = msgstring||" if you fail to choose anything \"
- msgstring = msgstring||" and hit OK. "
-
- y = postmsg(326,178,msgstring,host)
- done = 0
- do outer = 1 until done = 1
-
-
- filerep = getfile(326,56,,,"CLICK DIRECTORY AND/OR FILE",host)
- /* this checks to see that not everything is blank. */
-
- if filerep = '' then do
- x=postmsg()
- exit
- end
-
- /* here we check to see that we got a file and not just a directory */
-
- dircheck = statef(filerep)
- dirnum = index(dircheck,"DIR")
- if dirnum ~= 0 then do
- msgstring = " The name of the file itself \"
- msgstring = msgstring||" should appear in the lower \"
- msgstring = msgstring||" box. \"
- msgstring = msgstring||" \"
- msgstring = msgstring||" TRY AGAIN \"
- msgstring = msgstring||" (click left mouse button) \"
-
- y = postmsg(,,msgstring,host)
- iterate outer
- end
-
- x=postmsg()
-
- parse var filerep dir ":" filerep
- if filerep = "" then do
- filerep = dir
- dir = ":"
- end
- else dir = dir":"
- filerep = reverse(filerep)
- parse var filerep filename "/" subdir
- filename = reverse(filename)
-
- sendfile = dir||reverse(filerep)
-
- parse var filename xfn"."xft
- if xft ~= "" then ft = xft
-
-
- fillstring = ""
- fillstring = fillstring||"What do you wish it to be called\"
- fillstring = fillstring||"on the main frame?\"
- fillstring = fillstring||"The name shown below is the default\"
- fillstring = fillstring||"To assign your own name type over it"
-
- defaultname = xfn" "ft" a"
-
- ibmname = request(326,56,fillstring,defaultname,"Send It","Cancel",host)
-
- if ibmname = "" then exit
-
- if ibmname ~= defaultname then do
-
- parse var ibmname ifn ift ifm
-
- select
-
- when ifn = '' then ibmname = fn" "ft" "fm
- when ifn ~= '' & ift = '' then ibmname = ifn" "ft" "fm
- when ift ~= '' & ifm = '' then ibmname = ifn" "ift" "fm
- otherwise ibmname = ifn" "ift" "ifm
-
- end
-
- end
- if host ~= "VLT" then x = screentofront("VLT")
-
- if host ~= "VLT" then address VLT
-
- sendstring = "kermit receive "||ibmname" *R"
- sendstring = '"'||sendstring||'"'
-
- SEND "*R"
- call delay 100
-
- SEND "*X7"
- call delay 50
-
- SEND "*R"
- call delay 50
- SEND "*R"
-
-
- SEND sendstring
-
- call delay 250
-
- KS sendfile
- if host ~= "VLT" then address command x=screentoback("VLT")
-
- SEND "*R"
-
- call delay 50
-
- SEND "*R*R"
-
- call delay 50
-
- SEND "*R"
-
- SEND "*R"
-
- SEND "*N"
-
- done = 1
-
- end
-
- if host ~= "VLT" then x = screentoback("VLT")
- exit
-
- ERROR:
-
- say "There has been an error somewhere "
- exit 20
-
- SYNTAX:
- say "Syntax error"
- exit 20
-
-
- NOVALUE:
- say "Novalue error"
- exit 20
-
- HALT:
-
- say "External Halt detected"
- exit 20
-
- BREAK:
-
- say "Control C detected"
- exit 20
-
-