Solved

Cobol

Posted on 2004-10-01
5
883 Views
Last Modified: 2008-03-03
Ok,
I am trying to write a cobol program on the 400 for the first time, and I'm quite sure this is a syntax problem but for the life of me I can't seem to figure it out and haven't found an answer with ibm's website yet.

I have the following code:

IDENTIFICATION DIVISION.
PROGRAM-ID. TEST.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
                              SELECT EMPLOYEE-DATA ASSIGN TO EMP.

When I get to this point the SEU generates an error telling me the following:

Invalid Device Type in ASSIGN clause.

emp is a physical file that I have created so it does exist.....

Anyone have any idea what the heck I'm doing wrong here?

Douglas
0
Comment
Question by:dpalme
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
reginab earned 25 total points
Comment Utility
yea, it does not know what you are talking about with emp, should be more like this

FILE-CONTROL.
    SELECT EmployeeData ASSIGN TO "emp.DAT"
            ORGANIZATION IS LINE SEQUENTIAL.


also I would not call it test, I would call it testpgm as test is cobol reserve word so it is just bad practice.
0
 
LVL 27

Assisted Solution

by:tliotta
tliotta earned 25 total points
Comment Utility
Douglas:

Give it a device association:

FILE-CONTROL.
      SELECT EMPLOYEE-DATA ASSIGN TO database-EMP.

See where that takes you.

Tom
0
 
LVL 1

Author Comment

by:dpalme
Comment Utility
I'll try that Tom, it'll be a couple of days as my daughter is getting married this weekend, and I have another getting married at the end of the month LOL

Hey, no better way to clean out the house than marry off two of four daughters; both sons are already married so this is it.

Ok, I'll admit I'm going to miss the hell out of them not being around the house :)
0
 
LVL 1

Author Comment

by:dpalme
Comment Utility
I'm going to increase the points and award both of you the 25, both answers were helpful, thanks :)

Douglas
0
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
Douglas:

New platform, old language... once you get a few examples stashed away and maybe a template or two, this goes away.

The SEU message pointed to the ASSIGN clause which gives two general alternatives. First, the clause itself could need more detail. Second, some other problem caused SEU to believe the ASIGN clause should have been different.

Start with what the error says is wrong and work your way out.

Glad you got it going.

Tom
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now