Topics

Possibly a FAQ: FCOBOL and VSAM?


rjcorrig@...
 

Hi all,

I've been playing around with the DOS/VS 5-pack running under the VM/370 6-pack on Hercules.

I have an FCOBOL program that will take cards representing books on my bookshelf and insert them into an ISAM file. I've already got the same code working against a VSAM file through the ISAM Interface Program. 

Now I'd like to take the mask off and change my FD statement to tell FCOBOL that no, really, this is a VSAM file after all. But I am getting compile errors.

Code:
020135     SELECT OUTFILE                                               
020137         ASSIGN TO SYS012-BOOKS                                   
020138         ORGANIZATION IS INDEXED                                  
020140         RECORD KEY IS OUTFILE-ISBN                               
020141         FILE STATUS IS CHK.                                      
Compile errors:
17     ILA1132I-E     INVALID SYSTEM-NAME. SKIPPING TO NEXT CLAUSE.
19     ILA1017I-E     FILE INVALID IN RECORD CLAUSE. SKIPPING TO NEXT CLAUSE.
The syntax was lifted directly from page 143 of the DOS/VS Cobol Programmers Guide: http://www.bitsavers.org/pdf/ibm/370/DOS_VS/cobol/SC28-6478-2_DOS_VS_COBOL_Compiler_and_Library_Programmers_Guide_Jun76.pdf 

Thinking the compiler wanted the device class and type, even though the manual says they are for documentation purposes only, I changed the name to SYS012-DA-2314-BOOKS. I get fewer errors, but it still doesn't compile:

 17     ILA1141I-C     FILE ORGANIZATION FIELD INVALID IN SYSTEM-NAME.  SEQUENTIAL ASSUMED.
 17     ILA1015I-E     SYS012-DA-2314-BOOKS INVALID AS EXTERNAL-NAME. IGNORED.
 17     ILA1017I-E     ORGANIZATION INVALID IN SELECT CLAUSE. SKIPPING TO NEXT CLAUSE.
I went back through the old mailing list messages, because something jogged my memory about VSAM not being supported under the FCOBOL compiler in the DOS/VS 5-pack, but I couldn't put the pieces together to confirm or deny.

Before I waste a couple of days on this, am I on a fool's errand? Am I stuck with just using the ISAM interface?

Thanks for any advice.

Regards,
Robert Corrigan


René Ferland
 

Hello Robert,
 
FCOBOL does not support VSAM datasets to my knowledge. But you can use the VSAMIO package that Jay Moseley wrote for the MVT COBOL compiler. You may go to this address: https://geronimo370.nl/vm6pext/dos-vs/ and download the VSAMIO zip at the bottom of the page to get a job that installs Jay's assembler module. The archive contains a job to assemble VSAMIO on the 5-pack, an other one to catalog the VSAMIO copy books, and an example of a FCOBOL program that loads records into a VSAM KSDS cluster. There are many examples of VSAMIO usage on Jay's site. You may e-mail me for more info if you wish.
 
Best regards,
 
Rene FERLAND, Montreal


rjcorrig@...
 

Thank you René, I will check it out.

BTW, your videos on the Moshix YouTube channel are awesome. I wish they'd been around 8 years ago the first time I got hit with the DOS/VS obsession. I've learned a lot from them. Thank you.

Regards,
Robert Corrigan


Simon Knights
 

Hi Robert,

I've never written any Cobol (my first language for Fortran on DOS on a 360/40), but looking at the manual page that you referenced, it has 'SELECT OUTREC', but your code has 'SELECT OUTFILE'. I know that might be a red-herring, but it's a difference that stood out to me.

Hope you get it solved.
Simon Knights.
UK.

On 09/05/2020 00:46, rjcorrig@... wrote:
Hi all,

I've been playing around with the DOS/VS 5-pack running under the VM/370 6-pack on Hercules.

I have an FCOBOL program that will take cards representing books on my bookshelf and insert them into an ISAM file. I've already got the same code working against a VSAM file through the ISAM Interface Program. 

Now I'd like to take the mask off and change my FD statement to tell FCOBOL that no, really, this is a VSAM file after all. But I am getting compile errors.

Code:
020135     SELECT OUTFILE                                               
020137         ASSIGN TO SYS012-BOOKS                                   
020138         ORGANIZATION IS INDEXED                                  
020140         RECORD KEY IS OUTFILE-ISBN                               
020141         FILE STATUS IS CHK.                                      
Compile errors:
17     ILA1132I-E     INVALID SYSTEM-NAME. SKIPPING TO NEXT CLAUSE.
19     ILA1017I-E     FILE INVALID IN RECORD CLAUSE. SKIPPING TO NEXT CLAUSE.
The syntax was lifted directly from page 143 of the DOS/VS Cobol Programmers Guide: http://www.bitsavers.org/pdf/ibm/370/DOS_VS/cobol/SC28-6478-2_DOS_VS_COBOL_Compiler_and_Library_Programmers_Guide_Jun76.pdf 

Thinking the compiler wanted the device class and type, even though the manual says they are for documentation purposes only, I changed the name to SYS012-DA-2314-BOOKS. I get fewer errors, but it still doesn't compile:

 17     ILA1141I-C     FILE ORGANIZATION FIELD INVALID IN SYSTEM-NAME.  SEQUENTIAL ASSUMED.
 17     ILA1015I-E     SYS012-DA-2314-BOOKS INVALID AS EXTERNAL-NAME. IGNORED.
 17     ILA1017I-E     ORGANIZATION INVALID IN SELECT CLAUSE. SKIPPING TO NEXT CLAUSE.
I went back through the old mailing list messages, because something jogged my memory about VSAM not being supported under the FCOBOL compiler in the DOS/VS 5-pack, but I couldn't put the pieces together to confirm or deny.

Before I waste a couple of days on this, am I on a fool's errand? Am I stuck with just using the ISAM interface?

Thanks for any advice.

Regards,
Robert Corrigan



René Ferland
 

Hello Robert,

Finally, someone who like DOS/VS as much as me! :-)  Glad you like my videos, there should be one soon about VSAMIO on DOS/VS.

All the best,

Rene FERLAND, Montreal


Harold Grovesteen
 

On Sat, 2020-05-09 at 06:40 -0700, rjcorrig@... wrote:
Thank you René, I will check it out.

BTW, your videos on the Moshix YouTube channel are awesome. I wish
they'd been around 8 years ago the first time I got hit with the
DOS/VS obsession. I've learned a lot from them. Thank you.

Regards,
Robert Corrigan
 
The first OS to which I had exposure was DOS/VS.  One of my early
managers would only run DOS/VS.  Why?  It was the OS with the lowest
overhead.  That shop made its money by offering online services.  It
was heavily CICS oriented.  We even did our development in CICS/VS.
 All of the bespoke applications (the ones we made money with) were in
CICS/VS with assembler.

Those were the days that even some batch business applications were
actually written in assembler.  I have always had a fondness for
DOS/VS.

So, you are not alone there.

Harold Grovesteen


James King
 

where is your FD (File Descriptor) which come prior to the Select statement?
 


-----Original Message-----
From: rjcorrig@...
Sent: Fri, 08 May 2020 16:46:45 -0700
To: h390-dosvs@groups.io
Subject: [H390-DOSVS] Possibly a FAQ: FCOBOL and VSAM?

Hi all,

I've been playing around with the DOS/VS 5-pack running under the VM/370 6-pack on Hercules.

I have an FCOBOL program that will take cards representing books on my bookshelf and insert them into an ISAM file. I've already got the same code working against a VSAM file through the ISAM Interface Program. 

Now I'd like to take the mask off and change my FD statement to tell FCOBOL that no, really, this is a VSAM file after all. But I am getting compile errors.

Code:
020135     SELECT OUTFILE                                               
020137         ASSIGN TO SYS012-BOOKS                                   
020138         ORGANIZATION IS INDEXED                                  
020140         RECORD KEY IS OUTFILE-ISBN                               
020141         FILE STATUS IS CHK.                                      
Compile errors:
17     ILA1132I-E     INVALID SYSTEM-NAME. SKIPPING TO NEXT CLAUSE.
19     ILA1017I-E     FILE INVALID IN RECORD CLAUSE. SKIPPING TO NEXT CLAUSE.
The syntax was lifted directly from page 143 of the DOS/VS Cobol Programmers Guide: http://www.bitsavers.org/pdf/ibm/370/DOS_VS/cobol/SC28-6478-2_DOS_VS_COBOL_Compiler_and_Library_Programmers_Guide_Jun76.pdf 

Thinking the compiler wanted the device class and type, even though the manual says they are for documentation purposes only, I changed the name to SYS012-DA-2314-BOOKS. I get fewer errors, but it still doesn't compile:

 17     ILA1141I-C     FILE ORGANIZATION FIELD INVALID IN SYSTEM-NAME.  SEQUENTIAL ASSUMED.
 17     ILA1015I-E     SYS012-DA-2314-BOOKS INVALID AS EXTERNAL-NAME. IGNORED.
 17     ILA1017I-E     ORGANIZATION INVALID IN SELECT CLAUSE. SKIPPING TO NEXT CLAUSE.
I went back through the old mailing list messages, because something jogged my memory about VSAM not being supported under the FCOBOL compiler in the DOS/VS 5-pack, but I couldn't put the pieces together to confirm or deny.

Before I waste a couple of days on this, am I on a fool's errand? Am I stuck with just using the ISAM interface?

Thanks for any advice.

Regards,
Robert Corrigan


rjcorrig@...
 

Hi René,

Thanks for the help. I haven't had the chance to go back and retrofit the VSAMIO stuff into my program, but your example compiles and runs cleanly, so I think that's the ticket.

I'll keep an eye out for your next video.

Thanks again,
Robert