Solved

Cobol

Posted on 2004-10-01
5
917 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 July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Let's recap what we learned from yesterday's Skyport Systems webinar.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

624 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