HP3000-L Archives

April 1998, Week 1

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:
Michael Berkowitz <[log in to unmask]>
Reply To:
Michael Berkowitz <[log in to unmask]>
Date:
Thu, 2 Apr 1998 12:47:24 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
Greg Stigers writes:

>>> "Stigers, Greg ~ AND" <[log in to unmask]> 04/02/98 11:42am
>>>
I want to be able to dynamically create a (numbered) file with
particular attributes. I thought that by specifying OPTIONAL in the
SELECT statement, this would not be a problem, so long as I specified
the build paramaters elsewhere. I am having difficulty finding the
elsewhere, where I specify, for instance
FILE99;REC=-123,,F,ASCII;DISC=999999. Of course, I thought that this
would be easy to find... Would the build parameters come after the the
filename in the WORKING STORAGE description of the USING identifier?
Or
in the ASSIGN? Also, do I need a declarative to keep the program from
aborting when the OPTIONAL file does not already exist? Or is this even
necessary since I am OPENing the file OUTPUT?
------------------------------------------------------------------------------------
Why go to all the trouble of determining which Cobol environment division
clauses would do what you want, when it is easier to use MPE for this.
To build the file just call the COMMAND or HPCICOMMAND intrinsic,
passing your build statement and check the result.  To check if a file
exists, pass "LISTF filename>$NULL" via the COMMAND intrinsic and see
if the result is zero or not.  Also, the OPTIONAL clause is only necessary
for opening INPUT in 74 and 85 or opening I-O or EXTEND IN 85 only.
Otherwise, a default temp file of 10000 records is created for you.

Mike Berkowitz
Guess? Inc.

ATOM RSS1 RSS2