Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: ASA when using cobol
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.

Report this thread to moderator Post Follow-up to this message
Old Post
diesmo
09-28-04 08:55 AM


Re: ASA when using cobol
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Wagner
09-28-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:35 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.