Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

download file using rexx??

538 views
Skip to first unread message

Purnendu

unread,
Jan 28, 2002, 10:11:46 PM1/28/02
to
Hi I want to download a file to my pc at regular interval. Can any one
give a pointer like how to download it using REXX. One round about
solution, which comes to my mind, is by using a JCL from REXX but
there also I don’t know how to download a file from JCL. Any
help will be very useful to me.

OneHandClapping

unread,
Jan 28, 2002, 11:20:39 PM1/28/02
to
that would depend on how complicated your schedule requirements are.
perhaps you can use ftp scripting from your scheduling environment.

Purnendu wrote:
>
> Hi I want to download a file to my pc at regular interval.<snip

Allodoxaphobia

unread,
Jan 29, 2002, 2:10:08 PM1/29/02
to
On 28 Jan 2002 19:11:46 -0800, Purnendu scribbled:

> Hi I want to download a file to my pc at regular interval.

Well, you give *no* specifics on your environment -- other
than "...my pc...".

Look at ZOC (a terminal program - recommended) which is REXX-
enabled --- a solution for OS/2 _and_ WinDoze. ABSOLUTELY *ANYTHING*
you can do online - in a terminal window - you can 'REXX-up' in ZOC.

Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | frontier.net | DM68mn SK

Bill Bonde

unread,
Jan 29, 2002, 5:28:19 PM1/29/02
to

Allodoxaphobia wrote:
>
> On 28 Jan 2002 19:11:46 -0800, Purnendu scribbled:
> > Hi I want to download a file to my pc at regular interval.
>
> Well, you give *no* specifics on your environment -- other
> than "...my pc...".
>
> Look at ZOC (a terminal program - recommended) which is REXX-
> enabled --- a solution for OS/2 _and_ WinDoze. ABSOLUTELY *ANYTHING*
> you can do online - in a terminal window - you can 'REXX-up' in ZOC.
>

Isn't there some way to just send out the URL and have it retrieve the
file or the data?

hessling mark

unread,
Jan 29, 2002, 7:07:34 PM1/29/02
to
Purnendu <purnen...@infy.com> wrote:
: Hi I want to download a file to my pc at regular interval. Can any one

Have a look at Rexx/CURL (http://rexxcurl.sf.net)
It allows you to deal with anything that is addressable with a URL, like
ftp, http, etc.

Cheers, Mark
---------------------------------------------------------------------------
* Mark Hessling, M.Hes...@qut.edu.au http://www.lightlink.com/hessling/
* Author of THE; a Free XEDIT/KEDIT editor, Rexx/SQL, Rexx/Curses, Rexx/Wrapper
* Maintainer of PDCurses: Public Domain Curses and, Regina Rexx interpreter
* Use Rexx? join the Rexx Language Association: http://www.rexxla.org

Ian

unread,
Jan 29, 2002, 11:41:28 PM1/29/02
to
IBM Object Rexx has an FTP package that would work. You can also execute
FTP commands through JCL on a OS/390 mainframe to send a file to a PC -
for this you may need to talk to a systems programmer to find out what
access limitations may exist.

Ian

Phil Robyn

unread,
Jan 30, 2002, 1:07:13 AM1/30/02
to
Ian wrote:
>
> IBM Object Rexx has an FTP package that would work. You can also execute
> FTP commands through JCL on a OS/390 mainframe to send a file to a PC -
> for this you may need to talk to a systems programmer to find out what
> access limitations may exist.
>
> Ian

In order for OS/390 (or any other OS) to send files to your
computer via FTP, your computer must be running an FTP server.
The simplest way is for you to build an FTP script file containing
FTP commands on your computer (you can create it with Rexx or any
language of your choice, including CMD.EXE in WinNT) and then invoke
FTP.EXE that comes with Windows, using the built script as input.

Here's an example Rexx exec that first gets a directory listing of
an MVS partitioned data set and then uses the directory listing to
build a script to download all the members of the PDS, all using the
FTP.EXE that comes with Windows.

=====begin c:\rexx\dnldpds.rexx====================
01. /* Rexx - download members of an MVS partitioned data set */
02. /* */
03. /* arguments: mvs.pds.dataset.name [c:\pcpath\pcdir] */
04. /* */
05. /* If no pcpath\pcdir is specified, then the pds members */
06. /* will be downloaded to the current (sub)directory */
07. /* */
08. /***********************************************************/
09. endofhelp = 8
10. parse arg mvsdsn pcpath
11. if mvsdsn = '' then mvsdsn = '?'
12. if index('.HELP.?.-?./?.', '.'mvsdsn'.') > 0
13. then do
14. say sourceline(endofhelp)
15. do i = 1 to endofhelp
16. say sourceline(i)
17. end
18. exit
19. end
20.
21. loginid = value(mvs_userid, , 'SYSTEM')
22. passwrd = value(mvs_passwd, , 'SYSTEM')
23. mvshost = value(mvs_host , , 'SYSTEM')
24. tempdir = value(temp , , 'SYSTEM')
25. scriptfile = tempdir'\rexxftp.script'
26. dirlist = tempdir'\rxmvsdir.out'
27. mvsdsn = ''''mvsdsn''''
28. if pcpath ^= '' then pcpath = pcpath||'\'
29.
30. /* first get a directory of the pds */
31. address system 'echo>'scriptfile' user 'loginid passwrd
32. address system 'echo>>'scriptfile' cd 'mvsdsn
33. address system 'echo>>'scriptfile' dir * 'dirlist
34. address system 'echo>>'scriptfile' close'
35. address system 'echo>>'scriptfile' quit'
36.
37. call runscript
38.
39. address system 'echo>'scriptfile' user 'loginid passwrd
40. address system 'echo>>'scriptfile' cd 'mvsdsn
41. cmd = 'type' dirlist
42. rc = popen(cmd,"entries.")
43. do x = 2 to entries.0
44. member = STRIP(substr(entries.x, 1, 8), 't')
45. address system 'echo>>'scriptfile' get' member pcpath||member'.'
46. end
47. address system 'echo>>'scriptfile' close'
48. address system 'echo>>'scriptfile' quit'
49. call runscript
50. address system 'del 'scriptfile
51. exit
52.
53. runscript:
54. cmd = 'ftp -n -s:'scriptfile mvshost
55. rc = popen(cmd,"msgs.")
56. do x = 1 to msgs.0
57. if substr(msgs.x, 1, 4) ^= 'ftp>' then say msgs.x
58. end
59. return
=====end c:\rexx\dnldpds.rexx====================

>
> Bill Bonde wrote:
>
> > Allodoxaphobia wrote:
> > >
> > > On 28 Jan 2002 19:11:46 -0800, Purnendu scribbled:
> > > > Hi I want to download a file to my pc at regular interval.
> > >
> > > Well, you give *no* specifics on your environment -- other
> > > than "...my pc...".
> > >
> > > Look at ZOC (a terminal program - recommended) which is REXX-
> > > enabled --- a solution for OS/2 _and_ WinDoze. ABSOLUTELY *ANYTHING*
> > > you can do online - in a terminal window - you can 'REXX-up' in ZOC.
> > >
> > Isn't there some way to just send out the URL and have it retrieve the
> > file or the data?


--

u n z i p m y a d d r e s s t o s e n d e - m a i l

Graham C. Norris

unread,
Jan 30, 2002, 2:02:16 AM1/30/02
to

Ok, let's try to guess what your environment is.

1. You mention JCL. This could be VSE JCL, but I'm guessing it's MVS,
OS/390 or z/OS JCL.
2. MVS etc. can run TCP/IP stacks and can run FTP servers and the FTP
command. They can also run SNA/VTAM, with or without TCP/IP.
Unfortunately it is not possible to guess which are functional in your
environment.
3. You also mention your PC. I suppose we've got to assume it's running
some variant of Windows because if you weren't you'd probably mention
it. All variants of Windows for the last few years have included TCP/IP
stacks and an FTP command.
4. Windows (and other PC operating systems) can also run SNA protocols
and 3270 emulators. 3270 emulators include file transfer capabilities,
but the mainframe side needs to be set up to permit this.
5. If you use a 3270 emulator we don't know which communications
protocol is used.

Not got very far have we? One end is running an operating system which
is probably MVS, OS/390 or z/OS but may be VSE, and the other end is
running an operating system which is probably Windows but could be any
other PC operating system for which there is a REXX interprter. Each end
might be running TCP/IP and/or SNA, but we have no idea which, and you
may, or may not, be using a 3270 emulator.

About the only help which can be provided at this point is to suggest
you identify your environment in more detail.

Graham.

--
*-* Please remove spam free prefix before replying *-*

Phil Robyn

unread,
Jan 30, 2002, 2:57:12 AM1/30/02
to

//FTP1FILE EXEC PGM=FTP,REGION=4096K
//*----------------------------------------------------------------
//* ftp file from MVS to Windows machine running FTP server/daemon
//*----------------------------------------------------------------
//OUTPUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INPUT DD *
123.45.210.123
((pc userid))
((pc password))
put 'your.mvs.dataset.name(member)' c:\yourpath\yourfile.zzz
quit
/*
//

Purnendu

unread,
Feb 3, 2002, 12:05:46 AM2/3/02
to
Hi,
Thanx a lot. everything you have guessed is absolutely fine. Well to
identify the environment on which i am working:
I work on windows 2000 environment on my PC
I use RUMBA emulator to acess the mainframe.
Rumba does have the file transfer capabilities.
What i want is to download files from mainframe at regular interval
without using the emulator. Is it possible as i work on MVS.
i searched for a program named as ftp on the mainframe. I got load
modules named FTP,FTPD,FTPDNS in library
SYS1.SEZALINK.
If the above information seems insufficient plz ask which specific
information would be helpful.


Phil Robyn <pro...@uclink.berkzipeley.edu> wrote in message news:<3C57A758...@uclink.berkzipeley.edu>...

Phil Robyn

unread,
Feb 3, 2002, 11:16:38 AM2/3/02
to
Purnendu wrote:
>
> Hi,
> Thanx a lot. everything you have guessed is absolutely fine. Well to
> identify the environment on which i am working:
> I work on windows 2000 environment on my PC
> I use RUMBA emulator to acess the mainframe.
> Rumba does have the file transfer capabilities.
> What i want is to download files from mainframe at regular interval
> without using the emulator. Is it possible as i work on MVS.
> i searched for a program named as ftp on the mainframe. I got load
> modules named FTP,FTPD,FTPDNS in library
> SYS1.SEZALINK.
> If the above information seems insufficient plz ask which specific
> information would be helpful.
>

If I were you, I would forget about running FTP on MVS and simply use the
FTP.EXE program in Win2000. If you have Rexx on your Win2000 workstation,
you could use Rexx to create FTP command scripts; if you don't have Rexx,
then you can just use CMD.EXE to create NT batch files to do the same thing.
If you do this regularly, then add user environment variables for MVS_USERID,
MVS_PASSWD, and MVS_HOST so you won't be prompted to enter them every time.
Here's an NT batch file that will download a file from MVS without use of
any terminal emulator.

=====begin c:\cmd\demo\getmvs.cmd====================
01. @echo off
02. if "%1"=="" goto syntax
03. if "%1"=="?" goto syntax
04. if "%1"=="/?" goto syntax
05. if /i "%1"=="HELP" goto syntax
06. if "%2"=="" goto syntax
07. goto begin
08. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
09. :syntax
10. echo.
11. echo %0 - download a file from MVS to PC
12. echo.
13. echo syntax is %0 ^<MVS file name^> ^<PC file name^>
14. echo or %0 ^<MVS file name^> print
15. echo or %0 ^<MVS file name^> display
16. echo.
17. echo example: %0 abc.pub.lib(phones) \abc\xyz\worklib\phones.
18. echo %0 abc.pub.lib(phones) print
19. echo %0 abc.pub.lib(phones) display
20. echo.
21. echo The PC path (subdirectory) must already exist
22. echo.
23. echo If you specify the optional "print" parameter, the downloaded
24. echo file will be sent to LPT1; if you specify the optional "display"
25. echo parameter, the file will be displayed on your screen.
26. echo.
27. echo.
28. goto :EOF
29. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
30. :begin
31. set PC_file=%2
32. set actionflag=%3
33. if %PC_file%==print set PC_file=c:\temp\mvsprint & set actionflag=print
34. if %PC_file%==PRINT set PC_file=c:\temp\mvsprint & set actionflag=print
35. if %PC_file%==display set PC_file=c:\temp\mvsprint & set actionflag=display
36. if %PC_file%==DISPLAY set PC_file=c:\temp\mvsprint & set actionflag=display
37. set MVSfile=%1
38. set cmdfile=%~n0
39.
40. :get_MVSHOST
41.
42. if not defined MVS_HOST (
43. set /p MVS_HOST=Please enter the name or IP address of your MVS Host:
44. goto :get_MVSHOST
45. )
46.
47.
48. :get_USERID
49.
50. if not defined MVS_USERID (
51. set /p MVS_USERID=Please enter your MVS userid:
52. goto :get_USERID
53. )
54.
55. :get_PASSWORD
56.
57. if not defined MVS_PASSWD
58. set /p MVS_PASSWD=Please enter your MVS password:
59. goto :get_PASSWORD
60. )
61.
62. echo>c:\temp\%cmdfile%.ftp user %MVS_USERID% %MVS_PASSWD%
63. echo>>c:\temp\%cmdfile%.ftp get '%MVSfile%' %PC_file%
64. echo>>c:\temp\%cmdfile%.ftp quit
65.
66. echo>c:\temp\%cmdfile%.bat ^@echo off
67. echo>>c:\temp\%cmdfile%.bat %%"%%>%%"%% c:\temp\%cmdfile%.log ftp -n -s:c:\temp\%cmdfile%.FTP %MVS_HOST%
68. echo>>c:\temp\%cmdfile%.bat type NUL ^> c:\temp\%cmdfile%.FTP
69. if not defined actionflag set actionflag=none
70. if /i [%actionflag%] EQU [QUIET] goto :NOMSGS
71. echo.
72. echo Downloading file %MVSfile%
73. echo to %PC_file%
74. :NOMSGS
75. call c:\temp\%cmdfile%.bat > nul
76. find "250 " c:\temp\%cmdfile%.log > NUL
77. set rc=%errorlevel%
78. if %rc% EQU 0 goto dnldok
79. echo.
80. echo Transfer of file %MVSfile% failed. Check the following messages:
81. echo.
82. find /v "ftp>" c:\temp\%cmdfile%.log
83. type NUL > c:\temp\%cmdfile%.log
84. echo.
85. goto :EOF
86.
87. :dnldok
88. type NUL > c:\temp\%cmdfile%.log
89. if "%actionflag%"=="print" goto printfile
90. if "%actionflag%"=="display" list %PC_file%
91. goto :EOF
92.
93. :printfile
94. type %PC_file% > lpt1:
95. type c:\cmd\test\formfeed.dat > lpt1:
96. goto :EOF
97. :EOF
98.
=====end c:\cmd\demo\getmvs.cmd====================

Hab Fan

unread,
Feb 6, 2002, 10:35:07 AM2/6/02
to
Why don't you just set up a batch job that is regularly scheduled to FTP to your PC. Of course, you will need to
have an FTP server running on your PC, or on another PC which has write access to your drive on your PC. Make
sense? If you need a sample FTP job, let me know.

Larry

Purnendu wrote:

Opinions expressed herein are my own and may not represent those of my employer.

neil

unread,
Feb 8, 2002, 6:23:01 PM2/8/02
to
i can't get rexxcurl to work.


curl works, but rexxcurl not. i put rexxcurl files in system32. am using nt4
sp6a.

D:\Program Files\regina2_2>rexxcurl http://rexxcurl.sourceforge.net/
Could not read file: http://rexxcurl.sourceforge.net/

D:\Program Files\regina2_2>curl http://rexxcurl.sourceforge.net/
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"-->
<html>

suggestions?

thanks.


hessling mark <hess...@pigeon.qut.edu.au> wrote in message news:<3c57...@news.qut.edu.au>...

nntp.dk.uu.net

unread,
Feb 11, 2002, 3:10:38 PM2/11/02
to
Use WGET.EXE, the best utility I've used. It does ftp, http gets with login
etc. check it out.

Claus

"Purnendu" <purnen...@infy.com> wrote in message
news:4811a8f9.02012...@posting.google.com...

esa2000

unread,
Apr 8, 2002, 1:22:44 PM4/8/02
to
Steve Rubino: (866) 395-1981 (Toll Free)

Express/OS

Express/OS (XOS) is revolutionary packaging and installation software
for the OS/390 (z/OS, MVS, etc.) platform. Express/OS allows you to
install mainframe products from any Win32 platform on CD or via Web
download ( -without having to submit multiple XMITs or write a single
line of Rexx or JCL!)

Express/OS is a GUI-driven, seamless, installation procedure that does
not require any FTP client software or line commands. The Express/OS
Wizard (SDK) generates a self -extracting exe file to upload XMIT files
(via FTP) for installing mainframe products. Express/OS submits multiple
XMITs to generate JCL and creates all necessary datasets for product
installation. Express/OS also provides the option of submitting
mainframe JOBs via Win32 or the Web.

Express/OS is a dynamic systems utility for OS/390 product installation
and will be an invaluable tool for Product Vendors and System
Programmers looking to distribute mainframe software on CD or via the
Web for rapid deployment.

Summary of benefits:

Distribution/installation via CD or Web download:
- Saves on costs associated with generating and shipping TAPE/CART for
distribution of beta or trial releases or large-volume mailings
- Eliminates the need for TAPE/CART device access for product
installations
- Eliminates risk of the media, TAPE/CART corruption or damage caused by
shipping (by eliminating the need to ship!)
- Saves on expenses associated with sale/delivery processing online
- Increases product availability by allowing download links to be added
to website

Express/OS:
- Allows products to be installed remotely and with ease
- Allows products to be installed without systems programming knowledge
- Reduces media space requirements and network bandwidth requirements by
compressing XMITs and other input files.
- Eliminates need for third-party unzipping software
- Reduces technical support load by providing self-executing
installation
- Reduces documentation by imbedding DCB attributes and space
information in the self-extracting exe Protects the product from
piracy by placing product key in self-extracting exe file
- Eliminates need to pre-allocate mainframe datasets using TN3270/TSO
before uploading files -Does not require download of FTP client
software to upload mainframe files -Does not require FTP line commands

Express/OS truly is revolutionary packaging and installation software!

But don't take our word for it - Download our free trial now to
experience the future of mainframe product distribution today!

INSTALL EXPRESS/OS (XOS) V. 1.0.1 Now!

Additional Info available at:http://www.wdsdirect.com/xos.html

Questions/Comments? Call us Toll Free@ 866 395-1981 Your Sales Rep:
Steve Rubino

--
Posted via dBforums
http://dbforums.com

0 new messages