Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tape input for IBM/VSE cobol

Status
Not open for further replies.

darb5427

Programmer
May 12, 2003
14
0
0
US
Hello,

I have a question for anyone familiar with cobol on VSE. I’m coding a program that reads a 3490 tape in. The job compiles fine, but won't run, it fails with this message “permanent i/o error file name = sys006 . ccb=x"2e9092000c400106"
from compile unit c503051 at entry point c503051 at compile unit offset +00000794 at address 0060080c. cee5dmp v1 r4.1: condition processing resulted in the unhandled condition. We’ve tried several things to resolve this (most in the FD statements).

As I explained in an earlier post, we work with assembler here, and this is our first cobol experiment (and I’m the guinea pig). We don’t even know how to have a dump outputted so we can see exactly where it’s failing.

Thank you for all your help.

Darby

// option deck,nolink,listx
// exec igycrctl,size=igycrctl,parm='sz(max)'
cbl name,lib,nossr,apost,noadv,optimize,dyn are we missing something here that would produce a dump ?

Anything need added or subtracted from the code below ?
input-output section.
*
file-control.
*
select tape-in assign to sys006.
select cardsin assign to sys003.
select rptpkey assign to sys002.
*
data division.

file section.
*
fd tape-in
label records standard
record contains 400 characters
block contains 30 records
recording mode is f
data record is tape-record.




 
LE has intercepted the IO error and is cancelling without producing a storage dump. I think there's an option in LE that you can use to force a dump, but you really shouldn't need one.

You can add TEST(NONE,SYM) to your CBL card to get a formatted dump of your storage areas. I'm surprised you don't at least get an indication of the statement in error (of course the offset should tie back to the statement in the COBOL map).

I assume the tape file is fixed, blocked, standard-labelled, with 400 byte records blocked 30 records/block. Are you using DYNAM or EPIC? I assume you // ASSGN SYS006,TAPE or some equivalent in your JCL? You also have a // TLBL SYS006,'whatever'?? Are you using DYNAM, EPIC, or other disk/tape manager?

If you'd like to correspond about this outside the forum, you can e-mail me direct at mitchg <at> mmc.org.

Regards.

Glenn
 
Glenn,

I added the TEST (NONE, SYM) to my CBL card and this did generate additional information which I’m trying to interpret now.

We are using DYN and not EPIC is there a big difference between the 2?

As far as the tape file description and the JCL, yes that is how they are coded.

Thanks your help is much appreciated

Darb
 
Not a big difference in DYNAM and EPIC from a COBOL perspective. The problem is in how the disk/tape managers and LE interact. LE tries to do a lot of what the disk/tape managers do to provide device independence and sometimes it causes problems. It's likely that's your problem as there is no REAL problem in the COBOL you've shown us.

I'd suggest a couple of things:

1. Move away from SYS numbers for TLBL/DLBL names. Use of a real name makes things easier to track and you don't get confused between assignments and file names.

2. DYNAM can reserve some SYS number (particularly low ones) for unit record devices. If you need to use SYS numbers, try a higher one (e.g. SYS020)

Here's how I have one of my COBOL tape files handled:
Code:
// TLBL KMMRMBT,'HQ3.KM100.KMMRMMT',,,,,,02 
[\code]
note we don't use a SYS number.  The 02 causes EPIC to Rewind and Unload the tape at close.
[code]
SELECT INPUT-FILE ASSIGN TO KMMRMBT.

...

FD  INPUT-FILE
    BLOCK CONTAINS 30 RECORDS
    .
01  INPUT-RECORD                PIC X(400).
[\CODE]
This lets LE handle the device independence and EPIC handles the SYS number assignment.

Let me know how you make out.

Glenn
 
Here's how I have one of my COBOL tape files handled:

// TLBL KMMRMBT,'HQ3.KM100.KMMRMMT',,,,,,02
would HQ3 represent the tape unit assignment ? also what does KM100 and the ,,,,,,,'s represent ?

Thanks

darby
 
The literal between the apostrophes is simply the file name as recorded on the HDR1 label on the tape. It's also the file name stored in the EPIC (or DYNAM in your case) catalog. Most shops have some sort of convention to use for naming files. In our case the HQ3 describes the system (HealthQuest Release 3), KM100 is the program name for the program that creates the file, and KMMRMMT is the file name in the documentation.

The ,,,,,, are required as we have no positional paramenters from the TLBL statement in those positions. I believe DYNAM and EPIC both allow use of extended TLBL fields and both use the 02 for RUN. You can check the System Control Statements manual and your DYNAM documentation for descriptions of the missing positional parameters and the extended ones.

DYNAM/EPIC/LE will allocate a free logical unit number to use for accessing the tape. For an input file, it should ask the operator to mount the necessary tape on any available drive (i.e. use Automatic Volume Recognition (AVR) to locate the appropriate drive). DYNAM/EPIC/LE will allocate a free logical unit number to use for accessing the tape. For an output file, it will use any available scratch volume or ask the operator to mount one if one is not currently mounted on a free tape drive.

Glenn
 
I Apologize again for being so slow in getting back to everyone. We did eventually get this to run. This is the code that worked

FILE-CONTROL.

SELECT TAPE-IN ASSIGN TO SYS006-JOSHUA
ACCESS IS SEQUENTIAL
ORGANIZATION IS SEQUENTIAL.

FD TAPE-IN
LABEL RECORDS ARE STANDARD
RECORD CONTAINS 400 CHARACTERS
BLOCK CONTAINS 30 RECORDS
RECORDING MODE IS F
DATA RECORD IS TAPE-RECORD.


JCL- // TLBL JOSHUA,'TODAY.ORD.TO.SHIP'
// PAUSE ASSGN SYS006-TAPE IN

Thanks for everything

darby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top