21
HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Embed Size (px)

Citation preview

Page 1: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

HELLO WORLD program in COBOL - CIS12

Please use speaker notes for additional information!

Page 2: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello WorldHello World

To load MicroFocus COBOL after it has been installed on your computer, go to Programs, Personal COBOL, Personal COBOL. COBOL will load.

Page 3: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello WorldHello WorldI keyed in the lines of the program and saved it using File, Save As… The name I gave the file is hello.cbl.

This slide talks about the IDENTIFICATION DIVISION & ENVIRONMENT DIVISION.

Page 4: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

This slide talks about the DATA DIVISION.

Hello WorldHello World

In memory, there will be a one character area called GET-ANS where the user response will be stored.

GET-ANS

Page 5: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World

Hello World

The code for the PROCEDURE DIVISION.

Page 6: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello WorldHello World

Select Compile Program to test the program and if it is correct turn it into machine language.

Page 7: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - after successful compile

Hello World - after successful compile

Page 8: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

ERROR: Command/verb DISPLAY written as DSPLAY.

Hello World - compile error

Hello World - compile error

Page 9: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - compile error

Hello World - compile error

Page 10: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - compile error

Hello World - compile error

Page 11: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

This time I put a period after GET-ANS before the PIC X. This meant that the PIC made no sense and the GET-ANS field had a problem because it needed a PIC.

Page 12: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - compile error

Hello World - compile error

Page 13: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - compile error

Hello World - compile error

Page 14: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - fix compile error

Hello World - fix compile error

Error has been corrected.

Page 15: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - execute

Hello World - execute

Select Open for execution when you want to run your program.

Page 16: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - open for execution

Hello World - open for execution

Click on hello.int to select it for execution and then click OK.

Page 17: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - executing

Hello World - executing Hello.int is now open and shown on the screen.

Compile/Run followed by Run will execute the program.

Page 18: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - executing

Hello World - executing

Page 19: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - execute

Hello World - execute

Page 20: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!
Page 21: HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!

Hello World - source program loaded

Hello World - source program loaded