Environment Division



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Environment Division

Postby Alison Oliveira » Wed Feb 15, 2012 6:03 pm

Hello...
The information on ENVIROMENT DIVISION is site specific???
Alison Oliveira
 
Posts: 37
Joined: Fri Jan 20, 2012 9:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Environment Division

Postby Robert Sample » Wed Feb 15, 2012 6:24 pm

Which of the ENVIRONMENT DIVISION items are you talking about

SOURCE-COMPUTER
OBJECT-COMPUTER
SPECIAL-NAMES
ALPHABET
SYMBOLIC CHARACTERS
CLASS
CURRENCY SIGN
DECIMAL POINT IS COMMA
XML-SCHEMA
REPOSITORY

or are you referring to items in the INPUT-OUTPUT SECTION, where files are defined?

Some of these are site-specific, some are not. Some can be site-specific but may have generic values. The division includes so much, a general statement cannot be made about specificity.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Environment Division

Postby Alison Oliveira » Wed Feb 15, 2012 6:26 pm

i´m sorry... i don´t specificate correctly...
about this itens i was talking about...

SOURCE-COMPUTER
OBJECT-COMPUTER

thanks
Alison Oliveira
 
Posts: 37
Joined: Fri Jan 20, 2012 9:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Environment Division

Postby Robert Sample » Wed Feb 15, 2012 6:32 pm

The Enterprise COBOL Language Reference manual states that they are syntax-checked but only WITH DEBUGGING MODE in SOURCE-COMPUTER and COLLATING SEQUENCE in OBJECT-COMPUTER will affect the program.

In other words, if your site has a standard for them, follow it. Otherwise, you could use IBM-COMPUTER for each and COBOL will compile the program just fine.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Environment Division

Postby BillyBoyo » Wed Feb 15, 2012 6:40 pm

If you have files in your program, or are using SPECIAL-NAMES, or anything else Robert has already listed, you need what relates to those. Apart from your site standards, everything else can be left out. If you are not using anything in the ENVIRONMENT DIVISION you can actually leave it out altogether and everything will be fine.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Environment Division

Postby Anuj Dhawan » Fri Feb 17, 2012 3:32 pm

As Robert indicated, except for the WITH DEBUGGING MODE clause, the SOURCE-COMPUTER paragraph is syntax checked, but has no effect on the execution of the program.

What is "WITH DEBUGGING MODE clause" and what is 'D' in column 7 related to them -- I leave that to you for reading.
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post