View previous topic :: View next topic
|
Author |
Message |
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
Hi
Below is the stattement I hav tried from COBOL.
SELECT FIL-283
ASSIGN 'FIL-283'
ORGANIZATION INDEXED
ACCESS MODE DYNAMIC
RECORD IO-KEY
STATUS FS-283.
pls look @ the Compilation error message mentioned below & help me t rectify this...
IGYGR1235-E The external name field of the assignment-name "283"
It was processed as "B83".
-Messages Total Informational Warning Error Severe Terminating
0Printed: 7 3 1 3
-* Statistics for COBOL program ABDCNA:
* Source records = 4166
* Data Division statements = 1985
* Procedure Division statements = 337
0End of compilation 1, program ABDCNA, highest severity 12.
0Return code 12 |
|
Back to top |
|
|
Cristopher
New User
Joined: 31 Jul 2008 Posts: 53 Location: NY
|
|
|
|
Farnear,
Can you try using ASSIGN FIL283
Cris |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
There's a link to the manuals at the top of this page. The COBOL Language Reference says this about ASSIGN:
Quote: |
___ Format--QSAM file __________________________________________________
| |
| >>__ _________ __ _____ __name______________________________________>< |
| |_label- _| |_S- _| |
| |
|________________________________________________________________________|
___ Format--VSAM sequential file _______________________________________
| |
| >>__ _________ __AS- __name_________________________________________>< |
| |_label- _| |
| |
|________________________________________________________________________|
___ Format--Line-sequential, VSAM indexed or VSAM relative file ________
| |
| >>__ _________ __name_______________________________________________>< |
| |_label- _| |
| |
|________________________________________________________________________|
label-
Documents (for the programmer) the device and device class to which a file is assigned. It must end in a hyphen; the specified value is not otherwise checked. It has no effect on the execution of the program. If specified, it must end with a hyphen.
S-
For QSAM files, the S- (organization) field can be omitted.
AS-
For VSAM sequential files, the AS- (organization) field must be specified.
For VSAM indexed and relative files, the organization field must be omitted.
name
A required field that specifies the external name for this file.
It must be either the name specified in the DD statement for this file or the name of an environment variable containing file allocation information. For details on specifying an environment variable, see "Assignment name for environment variable" in topic 4.2.3.1, below.
The name must conform to the following rules of formation:
* If assignment-name-1 is a user-defined word:
o The name can contain from 1 - 8 characters.
o The name can contain the characters A-Z, a-z, 0-9.
o The leading character must be alphabetic.
* If assignment-name-1 is a literal:
o The name can contain from 1 - 8 characters.
o The name can contain the characters A-Z, a-z, 0-9, @, #, $.
o The leading character must be alphabetic. |
FIL-283 is illegal because the FIL- is a label and the name does not start with an alphabetic character, which is required. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Don't enclose the name in quotes! |
|
Back to top |
|
|
Cristopher
New User
Joined: 31 Jul 2008 Posts: 53 Location: NY
|
|
|
|
Quote: |
Don't enclose the name in quotes! |
Craq I believe the name within the quotes is fine....the problem is with the hyphen(-).
Cris |
|
Back to top |
|
|
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
Hi All,
Thanks for the wonderful information.
I have deleted the hyphen. I have used FIL283 . Now the error is resolved.
Cheers,
farnear |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Glad to hear you got it fixed. |
|
Back to top |
|
|
|