IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Solution to File Status Code "37"


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
psharma25

New User


Joined: 31 Mar 2009
Posts: 5
Location: Noida

PostPosted: Tue Mar 31, 2009 12:30 pm
Reply with quote

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
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Tue Mar 31, 2009 12:36 pm
Reply with quote

Hi,

Can you please post the open statement as coded in the program
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Tue Mar 31, 2009 1:43 pm
Reply with quote

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
View user's profile Send private message
psharma25

New User


Joined: 31 Mar 2009
Posts: 5
Location: Noida

PostPosted: Tue Mar 31, 2009 2:02 pm
Reply with quote

The OPEN statement is very simple

OPEN OUTPUT B100-UCLMDSB-FILE.
Back to top
View user's profile Send private message
senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Tue Mar 31, 2009 2:05 pm
Reply with quote

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
View user's profile Send private message
senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Tue Mar 31, 2009 2:07 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Mar 31, 2009 2:40 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Mar 31, 2009 4:51 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Mar 31, 2009 9:07 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top