Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Solution to File Status Code "37"

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Solution to File Status Code "37"
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    Post subject:
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: 356
Location: New York

PostPosted: Tue Mar 31, 2009 1:43 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Mar 31, 2009 2:40 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Mar 31, 2009 4:51 pm    Post subject: Reply to: Solution to File Status Code "37"
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: 7995
Location: Bellevue, IA

PostPosted: Tue Mar 31, 2009 9:07 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us