Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

004 illegal file name 3

Status
Not open for further replies.

bianca

Programmer
Jun 4, 2001
1
DE
Hi, that's my problem:
IDENTIFICATION DIVISION.
PROGRAM-ID.
BEISP13.
AUTHOR.
D. GOLDEN.
DATE-WRITTEN.
September 29, 1986.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT ZEILENAUSGABE-DAT ASSIGN TO S-OUTPUT.

DATA DIVISION.
FILE SECTION.
FD ZEILENAUSGABE-DAT
LABEL RECORDS ARE OMITTED.
01 ZEILEN-SATZ PICTURE X(26).

PROCEDURE DIVISION.
AOOO-AUSGABE-NAME-UND-ADRESSE.
OPEN OUTPUT ZEILENAUSGABE-DAT.
MOVE 'DONALD G. GOLDEN' TO ZEILEN-SATZ.
WRITE ZEILEN-SATZ.
MOVE 'CIS DEPARTMENT' TO ZEILEN-SATZ.
WRITE ZEILEN-SATZ.
MOVE 'CLEVELAND STATE UNIVERSITY' TO ZEILEN-SATZ.
WRITE ZEILEN-SATZ.
MOVE 'CLEVELAND, OHIO 44115' TO ZEILEN-SATZ.
WRITE ZEILEN-SATZ.
CLOSE ZEILENAUSGABE-DAT.
STOP RUN.
What's wrong?
Micro Focus Publishing
Personal Cobol, Version 2.0.02
bianca
 
For 0S/390, the following rules apply to the assignment name:

The name can contain from 1 - 8 characters.
The name can contain the characters A-Z, a-z, 0-9.
The leading character must be alphabetic.

If Micro Focus COBOL is adhering to these rules, then that's the problem.
 
What is "S-OUTPUT"? How is it defined? What OS is this running under? I believe this to be a run time error, not a compile error therefore "S-OUTPUT" must be assigned some kind of value that is valid in the operating system you are using. If that is DOS then the name must be DOS compliant. If it is some flavor of Windows then it must be Windows compliant. It must fully qualify the path to where the file resides or where it will reside once the file is written and closed.
 
In DOS/Windows environment try

SELECT ZEILENAUSGABE-DAT ASSIGN TO "LISTE".

By this you will create a file with the name LISTE in your current directory.

Regards
Dixi

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top