View previous topic :: View next topic
|
Author |
Message |
k_v_mahesh
New User
Joined: 25 May 2010 Posts: 15 Location: chennai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
|