×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Fujitsu Cobol Programming

Fujitsu Cobol Programming

Fujitsu Cobol Programming

(OP)
If anyone has some non-proprietary Cobol programs written to compile and run with Fujitsu Cobol, I would be greatly appreciate the opportunity to look them over to give me a better idea of the real world coding that works. I would be interested in looking at various examples and compiling, linking and running those program to learn about Fujitsu Cobol coding as I am absolutely new to this particular flavor

In particular, right now I am trying various things to get part of a program compiling right. Any input from you is most welcome. Thank you.

I thought I had the Select statement coded just fine for a file but it is not happy. Says SELECT clause must be a unique file-name in the description entry of FD. My code is shown below.

IDENTIFICATION DIVISION.
PROGRAM-ID. MYTEST.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.

SELECT XYZ-file ASSIGN TO "XYZ"
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS XYZ001
ALTERNATE RECORD KEY IS XYZ001 XYZ002
FILE STATUS IS STATUS-XYZ
LOCK MODE IS AUTOMATIC.


DATA DIVISION.
FILE SECTION.
FD XYZ
LABEL RECORDS ARE STANDARD
RECORD CONTAINS 512 CHARACTERS GLOBAL.
01 REG-XZY.
05 XYZ001 PIC X(4).
05 XYZ002 PIC X(4).
05 XYZ003 PIC X(105).
05 XYZ004 PIC X(11).
05 FILLER PIC X(388).

RE: Fujitsu Cobol Programming

(OP)
One of the things I am trying to work through is having a main module with copybooks being copied in.
If you have an example of a program that does that, I would appreciate looking at it.
Thank you

RE: Fujitsu Cobol Programming

Do you have a manual for Fujitsu COBOL? That said, if you're on PC, you need to do something like this for files:

CODE

SELECT KJV12 ASSIGN TO "KJV12.TXT"
ORGANIZATION IS LINE SEQUENTIAL.

FILE SECTION.
FD  KJV12
    Record Varying in Size from 1 to 80
    Depending on WS-Char-Cnt
    BLOCK CONTAINS 0 RECORDS.
01  KJV12-REC.
    05  Char Occurs 1 to 80 times
    	Depending on WS-Char-Cnt.
       10  Each-Char   	Pic X. 

As it's looking for a specific file name...in this case, a regular text file. Obviously this should point out the compiler error you have as your FD should be "XYZ-file" instead of what you got.

More or less (going to the copybook issue), it's pretty much the same as any other COBOL. The catch is you're going to have to set a dependent association within your project definition in order to catch the CBL you put your copybook material in. For my experience with Fujitsu COBOL (a rather old one a long time ago, v 3.0), I found a lot of the learning curve is more in the compiler options and the project definitions than what happens within the source files themselves.

Hope that helps some...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close