Home > Archive > Cobol > September 2004 > Re: ASA when using cobol
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: ASA when using cobol
|
|
| diesmo 2004-09-28, 3:55 am |
| Hello!
In fact i am trying to understand (learn) the COBOL language, so i
read all the documentation i can find on the net, i downloaded a lot
of program samples, i have RM/COBOL Compiler 74 and 85, MSCOBOL,
COBOL650, Fujitsu COBOL, cobcy, and TinyCobol to test these programs.
The construction
"SELECT internalFD1 ASSIGN to externalFD1 ASA."
does not compile with the compilers listed above.
As you said, the "ASA" is for documentation only, but the syntax is
parsed by the compiler.
"ASA" (QSAM) is documented here :
www.cs.niu.edu/~abyrnes/csci465/notes/465qsam.htm
As you said, ASA format uses a carriage control to prefix every
RECORD.
if i understood well, to describe sequential files, either
- the records have the same length :
==> RECORD CONTAINS 12 CHARACTERS ,
- or the records are delimited by a special character (";" for
example)
==> RECORD DELIMITER IS ; . (???)
- or the records are delimited by a "system" carriage control :
Machine or ASA carriage control (MCC or ASA).
==> RECORD DELIMITER IS STANDARD-1 (???)
it seems that the sentence above is equivalent to something like :
SELECT internalFD1 ASSIGN to externalFD1
ORGANIZATION IS SEQUENTIAL (the default one...)
RECORD DELIMITER IS SPACE.
Is it ?
(In fact the only construct i've found is : "RECORD DELIMITER IS
STANDARD-1").
I'll try to find other compilers to test this program (MF, IBM,
COMPAQ), but i think that none will accept it, or as you said, only
with a special directive.
The Program mention :
"SOURCE-COMPUTER. LEVEL-64"
I think it is MicroFocus, but i do not have the compile options.
Thank you!
Regards,
diesmo.
| |
| Robert Wagner 2004-09-28, 3:55 am |
| On 27 Sep 2004 06:29:21 -0700, partoche@caramail.com (diesmo) wrote:
>Hello!
>
>In fact i am trying to understand (learn) the COBOL language, so i
>read all the documentation i can find on the net, i downloaded a lot
>of program samples, i have RM/COBOL Compiler 74 and 85, MSCOBOL,
>COBOL650, Fujitsu COBOL, cobcy, and TinyCobol to test these programs.
Cobol is a big languge. A beginner has trouble distinguishing the
basic essentials from features that are obsolete, seldom used and
platform specific.
You might consider reading Thane Hubbell's "Teach Yourself Cobol in 24
Hours". Or read my Best Practices, a 30 page paper posted to this
newsgroup. It contains features you really need to know while omitting
unessential ones.
>The construction
> "SELECT internalFD1 ASSIGN to externalFD1 ASA."
>does not compile with the compilers listed above.
>
>As you said, the "ASA" is for documentation only, but the syntax is
>parsed by the compiler.
>
>"ASA" (QSAM) is documented here :
> www.cs.niu.edu/~abyrnes/csci465/notes/465qsam.htm
>As you said, ASA format uses a carriage control to prefix every
>RECORD.
ASA is for IBM mainframes. It sounds like you're in the PC world, so
don't worry about it. Line printers are obsolete anyway.
>if i understood well, to describe sequential files, either
> - the records have the same length :
> ==> RECORD CONTAINS 12 CHARACTERS ,
> - or the records are delimited by a special character (";" for
>example)
> ==> RECORD DELIMITER IS ; . (???)
> - or the records are delimited by a "system" carriage control :
>Machine or ASA carriage control (MCC or ASA).
> ==> RECORD DELIMITER IS STANDARD-1 (???)
>
>it seems that the sentence above is equivalent to something like :
> SELECT internalFD1 ASSIGN to externalFD1
> ORGANIZATION IS SEQUENTIAL (the default one...)
> RECORD DELIMITER IS SPACE.
>Is it ?
>(In fact the only construct i've found is : "RECORD DELIMITER IS
>STANDARD-1").
The format for fixed-length sequential is not as simple as it appears.
Some compilers expect a proprietary format known only to that
compiler. It may have a file header and/or something in front of each
record. Avoid this format.
On PC, the universal standard for flat files is records delimited by
cr/lf. On most compilers you specify that with:
ORGANIZATION IS LINE SEQUENTIAL
>I'll try to find other compilers to test this program (MF, IBM,
>COMPAQ), but i think that none will accept it, or as you said, only
>with a special directive.
>
>The Program mention :
> "SOURCE-COMPUTER. LEVEL-64"
>
>I think it is MicroFocus, but i do not have the compile options.
Level-64 was a Honeywell/Bull mainframe in the 70's. Generally,
source- and object-computer are for documentation only.
Don't spend much time on identification and environment divisions. The
meat and potatoes of Cobol is in the data and procedure divisions.
|
|
|
|
|