Well, after spending two days trying to fix this problem, I find out it is
not a problem, it's a feature!
We have a file that we want to copy to a save file name. The save file name
is constructed as FILEmmdd. However, if the FILEmmdd exists, we want to
append records to it. So we have this in our JCL:
IF FINFO('FILEmmdd',0) THEN
FILE X=FILEmmdd;ACC=APPEND
COPY NEWFILE, *X
ELSE
COPY NEWFILE,FILEmmdd
ENDIF
Imagine my surprise when this did not work in batch. Running it via a
session resulted in the query "PURGE OLD TARGETFILE.GROUP.ACCOUNT?" and
that's when I read the help for COPY in detail:
YOU MAY SPECIFY FILES THAT ARE BACKREFERENCED WITH A FILE EQUATION (*).
HOWEVER, THIS COMMAND SUPPORTS ONLY THREE FILE EQUATION OPTIONS: FILE NAME,
FINAL DISPOSITION (;SAVE OR ;TEMP) AND THE DISC VOLUME OR VOLUME CLASS
(;DEV=DISC OR ;DEV=<DISC LDEV NUMBER>). ALL OTHER FILE EQUATION OPTIONS ARE
IGNORED.
Fortunately, we still have FCOPY to accomplish our task, but why would HP
structure COPY to be so unlike any other file manipulation commands?
Jim Phillips Information Systems Manager
Email: [log in to unmask] Therm-O-Link, Inc.
Phone: 330-527-2124 P. O. Box 285
Fax: 330-527-2123 10513 Freedom Street
Web: http://www.tolwire.com Garrettsville, OH 44231
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|