home *** CD-ROM | disk | FTP | other *** search
- /* this is a test for a window which pulls stuff */
- parse arg filestuff 'SCREEN' screen
- parse var filestuff filerep ibmname
- screen = strip(screen)
- wildcard = 0
-
-
- if ~showlist('l','rexxarplib.library') then address command addrexxlib
- host = address()
- if host = 'VLT' then screen = 'VLT'
-
- /* if filerep is defined then don't do this */
-
- if filerep = "" then do
-
- 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,screen)
- done = 0
-
- do outer = 1 while done = 0
-
-
- filerep = getfile(326,56,,,"CLICK DIRECTORY AND/OR FILE",screen)
- wildcard = index(filerep,"*")
-
- /* 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,screen)
- iterate outer
- end
- x=postmsg()
- done = 1
- end
-
- end
- /* if filerep is defined then skip to here */
-
- 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 xft = "temp"
- defaultname = xfn" "xft" a"
-
- /* if no ibm name is supplied do */
- if wildcard = 0 then do
-
- if ibmname = "" then do
- 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"
-
-
- ibmname = request(326,56,fillstring,defaultname,"Send It","Cancel",screen)
-
- if ibmname = "" then exit
- end
- end
- /* if an ibmname was supplied then skip to here */
-
- if ibmname ~= "" & ibmname ~= defaultname then do
-
- parse var ibmname ifn ift ifm
-
- select
-
- when ifn = '' then ibmname = fn" "ft" "fm
- when ifn ~= '' & ift = '' then ibmname = ifn" "xft" "fm
- when ift ~= '' & ifm = '' then ibmname = ifn" "ift" "fm
- otherwise ibmname = ifn" "ift" "ifm
- end
- end
-
- if host ~= "VLT" & screen ~= 'VLT' then call screentofront("VLT")
-
- if host ~= "VLT" then address VLT
-
- if wildcard ~=0 then ibname = ""
-
- call "rexx:gensend.rexx"(sendfile||" AS "||ibmname)
-
- address command
- if host ~= "VLT" & screen ~= 'VLT' then call screentoback("VLT")
-
- exit
-
-