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
 

 

File open error 35

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
k_v_mahesh

New User


Joined: 25 May 2010
Posts: 15
Location: chennai

PostPosted: Fri Jun 08, 2012 7:55 pm    Post subject: File open error 35
Reply with quote

Currently I am having cobol program which is of COB version, here AMODE =24, RMODE=24
This program is trying to write records into Key sequenced file for which properties were defined as below.

In program

SELECT ABC-FILE ASSIGN ABCDEFUR
ACCESS IS DYNAMIC
ORGANIZATION IS INDEXED
FILE STATUS ABC-STAT
RECORD KEY IS ABC-KEY.

FD FOR DYNAMIC ACCESS OF VSAM KSDS FILE

FD ABC-FILE
RECORD CONTAINS 55 TO 3955 CHARACTERS
BLOCK CONTAINS 0 RECORDS
LABEL RECORDS STANDARD.

01 ABC-LARGEST-RECORD.
03 ABC-KEY.

05 ABC-FIELD1 PIC X(01).
05 ABC-FIELD2 PIC X(05).
05 ABC-FIELD3 PIC XX.
88 ABC-FILED '20'.
05 FILLER PIC X(10).
05 ABC-FILED4 PIC XX.
03 ABC-FIELD5 PIC X(3935).

01 ABC-REC-C3.
03 FILLER PIC X(20).
03 ABC-C3-NUM-OCCURS PIC S9(4) COMP.
03 FILLER PIC X(33).
03 FILLER PIC X(52)
OCCURS 0 TO 75 TIMES
DEPENDING ON ABC-C3-NUM-OCCURS.



OPEN I-O ABC-FILE.


In JCL

//ABCDEFUR DD DSN=&&ABCDEF,
// DISP=(NEW,PASS,DELETE),
// RECORG=KS,UNIT=DISK,LRECL=4088,KEYLEN=20,
// SPACE=(4088,(01000,00200),RLSE),AVGREC=U



We are converting this program into latest version i.e COB3 AMODE=31, RMODE=24. By initializing all the variables and using COB3 conversion compiler. When we run this Job we are getting the return code of 35 I.E ERROR in opening the file. It is working fine with COB compiler.

Our guess is, In COB version the system might have allowed the BDAM file, but here in COB3 it may not allowed. In this case do we need to change the file into VSAM(We tried but not able to) or any other work around.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jun 08, 2012 8:23 pm    Post subject:
Reply with quote

1. Your terminology is NOT standard and hence incomprehensible. What is "COB"? What is "COB3"? The current IBM mainframe compiler for COBOL is Enterprise COBOL for z/OS -- previous compilers include COBOL for MVS & VM, VS COBOL II, OS/VS COBOL. Not a 3 to be seen anywhere.

2. Your last sentence talks about a BDAM file but nothing you posted up to then mentioned ANYTHING about a BDAM file -- only a VSAM KSDS file.

3. You would need to post a LISTCAT of the VSAM file for us to be able to help you, even without the previous two issues.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Jun 08, 2012 8:27 pm    Post subject:
Reply with quote

you would have to check the cobol lang ref and the prog guide to determine how to handle BDAM.

a 35 means the dsn in the dd statement does not exist.

i believe the error generated by a BDAM file incorrectly defined to a COBOL program (SELECT and FD statements) would not be 35.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1772
Location: Bloomington, IL

PostPosted: Fri Jun 08, 2012 8:33 pm    Post subject:
Reply with quote

Robert Sample wrote:
1. Your terminology is NOT standard and hence incomprehensible. What is "COB"? What is "COB3"? The current IBM mainframe compiler for COBOL is Enterprise COBOL for z/OS -- previous compilers include COBOL for MVS & VM, VS COBOL II, OS/VS COBOL. Not a 3 to be seen anywhere.

Actually, "COBOL 3" is a pretty standard misnomer for Enterprise COBOL. Frequency of usage does not make it right, of course.

(ETA: The RECORG=KS parameter on the DD statement means that this data set is a KSDS. I rather think that Magesh and his team are definitely confused about what's being done here.)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jun 08, 2012 8:35 pm    Post subject:
Reply with quote

Looking closer at what you posted, you have quite a few problems. Your COBOL code indicates DD name ABCDEFUR is a VSAM file (access dynamic, organization indexed) -- whereas your JCL snippet has that file as a sequential, non-VSAM file. And I think your DD statement is mis-placed, anyway, since a 35 file status code usually means the DD name does not exist, although it could also mean the data set was never written to.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Jun 08, 2012 8:40 pm    Post subject:
Reply with quote

I'm in agreement with Robert - Your terminology is NOT standard, also in the context you've used the words does not make it that obvious. Such as this one,
Quote:
When we run this Job we are getting the return code of 35
When you talk about COBOL, RETURN-CODE is a special register to pass a return code to the program or the system before executing a STOP RUN statement. It has the implicit definition. Most possibly you mean to say "FILE STATUS 35" which Dick has explained.

And foe COB/COB3 I believe you're talking about the names a version-control assigns to the program to identify them in its own legacy, which is totally site specific and as Robert indicates that tough to comprehend.
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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