Solved

Cobol

Posted on 2004-10-01
5
913 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
reginab earned 25 total points
ID: 12204241
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
ID: 12244851
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
ID: 12252610
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
ID: 12279318
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
ID: 12279801
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

734 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