As the information is missing I can only guess: Possibly you try to open a file that is not matching the IO handler?
As your message shows: that's a GnuCOBOL version configured to handle ORGANIZATION INDEXED with its own BDB backend, so the file you try to open was likely not created with that.
BTW: If you register/login you don't create entries in the moderation queue - if you don't want to do that please post only a single time and wait until a mod put some time in pre-reading your post and unblock it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Attached is a functional GnuCOBOL ISAM example.
It may prove useful.
It is executed via the command line.
SET VETDSN=C:\IBZANIM\GNUDATA\IBZVSAM.DAT
VETDSN is the DDNAME as referenced in the ASSIGN clause of the SELECT statement.
VETDSN
If you would like the program that creates the VSAM file let me know.
You need to pay attention to how the ASSIGN clause is used at execution.
There is a -f compiler directive that controls the resolution of the ASSIGN clause to file name.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2023-05-15
Hi, can I get the program that creates the VSAM file,also the compiler directive that controls the resolution of the ASSIGN clause to file name.
sorry for the duplicate request.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To execute from a .BAT / .CMD
SET VSAMDSN=B6555.PPL.VSAMFILE
MAKEVSAM
The attached creates a VSAM file and subsequently reads the VSAM file created in the program.
If executed on zOS it would fail because the VSAM file would need to be created by the IDCAMS utility. It executes on Windows without the IDCAMS cluster definition.
ISAM is no longer supported by zOS / IBM COBOL.
You could replace the calls to ZMSGBOX with:
DISPLAY ZMSG1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2023-05-16
yes. I'm new to VS code and I wanted to run execute a file cobol program to read random record. I just wanted to know how to give input(key,data) in .dat file(unsorted) and the terminal keywords to use those file to run my program. You have already given the cobol program which was very helpful. I have run sequential file program but vsam file program was not much clear in your manual. Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Below is a program that reads a sorted sequential file and writes it to a new Index file. And a program that randomly reads a file from that indexed file.
Hi, I'm trying an indexed cobol program to read random record. I'm getting the below error
What are the procedures need to run ksds file program?
Last edit: Simon Sobisch 2023-05-13
As the information is missing I can only guess: Possibly you try to open a file that is not matching the IO handler?
As your message shows: that's a GnuCOBOL version configured to handle
ORGANIZATION INDEXEDwith its own BDB backend, so the file you try to open was likely not created with that.BTW: If you register/login you don't create entries in the moderation queue - if you don't want to do that please post only a single time and wait until a mod put some time in pre-reading your post and unblock it.
Attached is a functional GnuCOBOL ISAM example.
It may prove useful.
It is executed via the command line.
SET VETDSN=C:\IBZANIM\GNUDATA\IBZVSAM.DAT
VETDSN is the DDNAME as referenced in the ASSIGN clause of the SELECT statement.
VETDSN
If you would like the program that creates the VSAM file let me know.
You need to pay attention to how the ASSIGN clause is used at execution.
There is a -f compiler directive that controls the resolution of the ASSIGN clause to file name.
Ralph
Last edit: Ralph Linkletter 2023-05-13
Hi, can I get the program that creates the VSAM file,also the compiler directive that controls the resolution of the ASSIGN clause to file name.
sorry for the duplicate request.
are you going to use a presorted sequential file ready to load?
Last edit: Mickey White 2023-05-16
The -f option I use
-fassign-clause=ibm
This is the JCL used to execute the program
To execute from a .BAT / .CMD
SET VSAMDSN=B6555.PPL.VSAMFILE
MAKEVSAM
The attached creates a VSAM file and subsequently reads the VSAM file created in the program.
If executed on zOS it would fail because the VSAM file would need to be created by the IDCAMS utility. It executes on Windows without the IDCAMS cluster definition.
ISAM is no longer supported by zOS / IBM COBOL.
You could replace the calls to ZMSGBOX with:
DISPLAY ZMSG1
Ralph
yes. I'm new to VS code and I wanted to run execute a file cobol program to read random record. I just wanted to know how to give input(key,data) in .dat file(unsorted) and the terminal keywords to use those file to run my program. You have already given the cobol program which was very helpful. I have run sequential file program but vsam file program was not much clear in your manual. Thanks
Below is a program that reads a sorted sequential file and writes it to a new Index file. And a program that randomly reads a file from that indexed file.
Last edit: Mickey White 2023-05-16