Solved

Cobol

Posted on 2004-10-01
5
903 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Setup SFTP for internal iSeries servers 8 1,528
adodb sql multi tables 1 1,241
creating materialized view in ibm i series 5 87
iSeries Backup 3 40
While it may be true that the internet is a place of possibilities, it is also a hostile environment lurking with many dangers. By clicking on the wrong link, trusting the wrong person or using a weak password, you are virtually inviting hackers to …
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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