View previous topic :: View next topic
|
Author |
Message |
psharma25
New User
Joined: 31 Mar 2009 Posts: 5 Location: Noida
|
|
|
|
Hi
I am trying to write a GDG in a program and opening it in OUTPUT mode. The file is giving a status of "37". I check out everything and all seems to be OK. Please advise what should I to to solve this problem.
Section in JCL:
Code: |
//UCLMDSB DD DSN=PLDMOR.DEVL.WMBX.CLMDSB.DATA(+1),
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(50,5),RLSE),
// RECFM=FB,LRECL=120
|
Entry in program:
Code: |
SELECT B100-UCLMDSB-FILE ASSIGN TO AS-UCLMDSB
FILE STATUS IS W-FILE-STATUS.
FD B100-UCLMDSB-FILE.
01 B100-UCLMDSB-REC PIC X(120). |
Please help.
Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Hi,
Can you please post the open statement as coded in the program |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Following is the description of file status '37'.
Quote: |
An OPEN statement was attempted on a file that would not support the open mode specified in the OPEN statement. Possible violations are: 1. The EXTEND or OUTPUT phrase was specified but the file would not support write operations. 2. The I-O phrase was specified but the file would not support the input and output operations permitted. 3. The INPUT phrase was specified but the file would not support read operations.
|
check whether you have permission to edit that particular GDG. |
|
Back to top |
|
|
psharma25
New User
Joined: 31 Mar 2009 Posts: 5 Location: Noida
|
|
|
|
The OPEN statement is very simple
OPEN OUTPUT B100-UCLMDSB-FILE. |
|
Back to top |
|
|
senthilnathanj
New User
Joined: 31 Jul 2007 Posts: 47 Location: chennai
|
|
|
|
hi,
File Stattus 37 in COBOL means An OPEN operation has been tried on a file which does not support the open mode specified in the OPEN statement.
In your program can you check the open statement. Otherwise can you post the code . |
|
Back to top |
|
|
senthilnathanj
New User
Joined: 31 Jul 2007 Posts: 47 Location: chennai
|
|
|
|
Hi,
File status = 37. A permanent error exists because an OPEN statement is attempted on a file and that file will not support the open mode specified in the OPEN statement. The possible violations are:
a) the EXTEND or OUTPUT phrase is specified but the file will not support write operations.
b) the I-O phrase is specified but the file will not support the input and output operations that are permitted for the organization of that file when opened in the I-O mode.
c) the INPUT phrase is specified but the file will not support read operations. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Is the generation in question been created? Can you locate it via ISPF 3.4, if yes, please show the "Data Set Information " ("I" or "S" in front of DSN in 3.4). |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
OK, I know I'm not a COBOL guy, but doesn't "ASSIGN TO AS-UCLMDSB" specify a VSAM Sequential dataset (ESDS)? Shouldn't a QSAM dataset be either "ASSIGN TO S-UCLMDSB" or just "ASSIGN TO UCLMDSB"? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Yes, Kevin, and the 37 file status is because COBOL thinks the file is VSAM sequential and the JCL attributes don't support opening a VSAM file. |
|
Back to top |
|
|
|