Comments (3)
Ah...Totally missed the period sign. That's exactly what I needed to know. Thanks!
from cobol-programming-course.
@pineconeman09 - My advice, get rid of ALL unnecessary periods. They are just not necessary any more. And, more good advice for those starting out:
- There should only be 2 periods per paragraph, 1 at the end of the paragraph name, and 1 on a blank line of its own at the end of the paragraph.
- Always use GOBACK instead of STOP-RUN.
- No need to use PERFORM THRU or EXIT paragraphs.
- No need to use GOTOs. Use an IF statement and CONTINUE to check the (88-level) value of LASTREC to conditionally execute the PERFORM. Or, since you will only use 1 period within a paragraph, NEXT SENTENCE will take you to the end of the paragraph.
- A READ or WRITE paragraph should be limited to just a READ of a file or WRITE of a record. Optionally, one group MOVE statement. The purpose of this type of paragraph is to be versatile enough to be able to perform it multiple times from different parts/areas of your program.
- Never use NOT or only in very obvious, simple usage.
from cobol-programming-course.
Explicit means being verbose about something. Implicit means omitting something because that something is expected or obvious.
If you notice, there is an implicit termination
IS-STATE-VIRGINIA.
IF USA-STATE = 'Virginia' THEN
ADD 1 TO VIRGINIA-CLIENTS. <---- here, the period
END-IF.
But, the compiler doesn't know what you want to achieve. For the compiler the implicit termination is enough, so it complains that the it END-IF is not necessary.
There are two ways of resolving that compiler error:
- You decide to use the implicit terminator (period is a sentence terminator that implicitly terminates
IF
) - You decide to use the explicit terminator (
END-IF
, so you should remove the period at the end of previous line).END-IF
is an explicit terminator, but it is only valid with a periodEND-IF.
from cobol-programming-course.
Related Issues (20)
- Improvement: Non-technical intro to JCL at start of course
- Improvement: New Features of Enterprise COBOL v6.3
- Descargar Enterprise COBOL v6.3 HOT 1
- Website HOT 7
- Getting started Paragraph 3.2 Basic editing: line numbers are off HOT 1
- Readable and maintainable COBOL code
- Update course with survey result from COBOL WG HOT 6
- Unable to join Slack workspace. HOT 2
- Error in binary-ranges-3.png (Length and Range at S9(9) is wrong HOT 2
- Learning COBOL Programming with VSCode - Restricted acces to #openmainframeproject channel HOT 2
- No Labs or samples provided HOT 1
- Unable to join Slack - Account deactivated HOT 1
- Another COBOL Programming exercise for VSAM indexed file with alternate indices HOT 1
- COBOL compilation output file names are wrongly displayed.
- screen images in documentation use too much ink HOT 1
- API Output for COVID-19 COBOL Challenge is Offline
- Optimization possible in CBL0106.cbl
- lab or exercise with cobol-java-calling HOT 1
- Update content / screenshots for Zowe v3 Explorer
- Addition of content related to CI/CD by using Jenkins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cobol-programming-course.