Solved

Cobol

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
trying to Write to AS400 using SSIS Packs but getting error SQL 0189 6 412
Define external data structure with free d specs in RPG 4 358
AS400 Printing 10 274
AS/400 Backup to Disk 7 414
If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

778 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