I had to do the very same thing recently. I used MPEX to solve the
"gathering" problem and used posix directories to hold the file names.
Here is the JCL snippet
!RUN ?$LOCKWORD=FTP.ARPA.SYS$?
prompt
OPEN 141.177.59.2
USER hp3kxfer image2000
DIR
mget ./HC* ;REC=-320,1,F,ASCII
mget ./UB* ;REC=-192,1,F,ASCII
exit
!RUN MAIN.PUB.VESOFT
gather /!HPACCOUNT/!HPGROUP/HC@,320,BR6001A0.DATA
gather /!HPACCOUNT/!HPGROUP/UB@,192,BR6001A1.DATA
Now here is the "gather" command file that I wrote
PARM FROMSET,RECWIDTH=80
ANYPARM TOFILE
if fexists("!tofile") then
echo Target file !TOFILE exists
yespurge !tofile
endif
build !tofile;rec=-!recwidth,1,f,ascii;disc=1000000
file outfile=!tofile;acc=append
repeat
file infile=!mpexcurrentfile
ECHO -----GATHERing !MPEXCURRENTFILE ==!> !TOFILE
ERRCLEAR
fcopy from=*infile;to=*outfile>$NULL
IF CIERROR = 0
: PURGE !MPEXCURRENTFILE
ELSE
ECHO FCOPY of !MPEXCURRENTFILE failed
ENDIF
forfiles !fromset
this assumes that I want to purge the original source files.
shawn
"Glenn J. Koster, Sr." <[log in to unmask]> on 09/08/99 09:46:25 AM
Please respond to "Glenn J. Koster, Sr." <[log in to unmask]>
To: [log in to unmask]
cc: (bcc: Shawn Gordon/IS/FHM/FHS)
Subject: FTP and "mget" (from W/NT to HP3000)
Okay, it's finally my turn to ask another question. We have a job that
currently retrieves a series of files from a Windows/NT server. This
process
is done one file at a time, but it picks up every file in the directory.
Unfortunately the number and names of the files may change frequently, but
we
will always need to pick up all of the individual files and transfer them
to
the HP 3000 for processing as one combined file. Is there a way with
"mget"
under FTP to do a wild card transfer and have them combined into a single
large
file on the host?
Glenn
--
______________
| Navigators | Under contract to Hewlett-Packard SSD (Greeley, CO)
| |) |
| | ) | Glenn J. Koster, Sr. [log in to unmask]
| | ) | Managed Business Solutions http://www.mbsnav.com
| | ) | 214 S. College, Suite 201 At HP: (970) 350-5337
| |---- | Fort Collins, CO 80524 At MBS: (970) 224-1016
| ============ | At Home: (316) 549-3622
| \__________/ |
| of Change | aka: [log in to unmask] / [log in to unmask]
|______________| home: http://members.aol.com/MichiTex
|