HP3000-L Archives

August 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jim Phillips <[log in to unmask]>
Reply To:
Jim Phillips <[log in to unmask]>
Date:
Fri, 24 Aug 2001 11:36:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
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 *

ATOM RSS1 RSS2