HP3000-L Archives

June 1999, Week 3

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:
TRACY PIERCE <[log in to unmask]>
Reply To:
Date:
Tue, 15 Jun 1999 06:42:36 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
As it has been written, the following ASSIGN clause...
052000     SELECT CUSTOMER-SAVE
052010         ASSIGN TO "CUSTSV,DA,A,DISC,,10000,,"
052020         ORGANIZATION IS INDEXED
052030         ACCESS MODE IS DYNAMIC
052040         RECORD KEY IS CSR-KEY
052050         FILE STATUS IS CUSTOMER-SAVE-STATUS.
...results in the (actually quite accurate but still confusing) HP COBOL
error message
00069  052010  26    250    Q    FORMS MESSAGE MUST END WITH A PERIOD.

But KISS!:  Get away from this "bad" old IBM360 syntax, which is/was
supported by HP COBOL for compile-and-go compatibility.  The nasty
comma-separated parameter list is a very good example of what made IBM
"bad" and the new HP3000 "good".  IBM's comma-separated parameter lists
grew to the point of being incomprehensible without a manual and careful
attention to comma counting.

Much easier (and more flexible) is to separate the file system from your
program by minimizing the function of the ASSIGN clause...
SELECT CUSTOMER-SAVE
    ASSIGN TO "CUSTSV"     {remove ALL cryptics, they're NEVER needed!}
         ORG...FILE-STATUS     {are all needed and stay the same}
And put any of the NEEDED cryptic stuff into a nice self-documenting file
equation...
:FILE CUSTSV;DEV=DISC;DISC=10000;SAVE
(btw, SAVE is the only item of any value here, and is needed only if this
is the first-ever access to this permanent file - COBOL will build it in
the temporary domain by default.)  DA,A,DISC, and I believe 10000 are all
defaults!

Who wants to remember what parameter is referred to by "the 5th comma"?
Get past the ASSIGN the easy way, and go work on your program (in which
also KISS!).


K Tracy Pierce
Systems Programmer
Golden Gate Bridge Highway & Transportation District
San Francisco, CA  94129-0601

ATOM RSS1 RSS2