IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Writing a tape file of LRECL 260K via COBOL Program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vidya Bhama

New User


Joined: 17 Sep 2008
Posts: 41
Location: Chennai

PostPosted: Tue Jan 14, 2014 10:29 pm
Reply with quote

Hi ,

I am trying to create a tape file with LRECL 260K in my COBOL program. But the compilation fails with the
Code:

IGYGR1223-E  The minimum calculated record size of file "OUT-FILE" was greater than the maximum allowable size 32767. 32767 was assumed.

IGYGR1224-E   The maximum calculated record size of file "OUT-FILE" was greater than the maximum allowable size 32767. 32767 was assumed.


It does not allow me a length beyond 32K. But my input would have much longer data than that. Can anyone please advise how i can fix this?

Regards,
Vidya
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 14, 2014 10:40 pm
Reply with quote

Hello,

Why does someone believe you need to create individual records this long?

Sounds like a design issue . . .
Back to top
View user's profile Send private message
Vidya Bhama

New User


Joined: 17 Sep 2008
Posts: 41
Location: Chennai

PostPosted: Tue Jan 14, 2014 10:49 pm
Reply with quote

Hi Dick,

Its an XML text thats so long comming in the input and the business needs the full data to be seen for their analysis.

As tape allows any length i thought i can write onto a tape file. But COBOL program does not allow me. So i was looking if there was any way i can achieve this.

Thanks,
Vidya
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jan 14, 2014 11:51 pm
Reply with quote

Vidya,

Can you provide the reference which indicates the maximum record-length which tape allows?

You can have large blocksizes.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Jan 15, 2014 12:11 am
Reply with quote

Enterprise COBOL limit for record size is 1,048,575 bytes but the QSAM maximum is 32,760. See Language Reference Manual.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 15, 2014 12:23 am
Reply with quote

Hello,

Quote:
Its an XML text thats so long comming in the input and the business needs the full data to be seen for their analysis.
Possibly you can consider putting this into a database table?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 15, 2014 12:23 am
Reply with quote

Quote:
As tape allows any length i thought i can write onto a tape file.
You will need to cite a manual reference for this quote. COBOL can allow for record lengths on tape to be longer than 32767 bytes, but only under very limited conditions, NOT in general.

Why not simply have the source send the XML in records of less than 32767 bytes and combine them into one data structure in your COBOL program? And write the XML data out in records of less than 32767 bytes as well.
Back to top
View user's profile Send private message
Vidya Bhama

New User


Joined: 17 Sep 2008
Posts: 41
Location: Chennai

PostPosted: Wed Jan 15, 2014 1:47 am
Reply with quote

Hi,

I saw it in the JCL guide,

According to the MVS JCL Reference guide,
Quote:
The number of bytes that you specify for BLKSIZE depends on the device type and the record format for the data set. The maximum is 32760 for DASD data sets and 2,147,483,648 for tape, except for data sets on magnetic tape with ISO/ANSI/FIPS labels, where the minimum value for BLKSIZE is 18 bytes and the maximum is 2048 bytes.


Hence went for it.

Thanks,
Vidya
Back to top
View user's profile Send private message
Vidya Bhama

New User


Joined: 17 Sep 2008
Posts: 41
Location: Chennai

PostPosted: Wed Jan 15, 2014 1:53 am
Reply with quote

Thanks for your suggestion above, I spoke to my database team on table creation for these but until then we are looking for putting split and putting onto multiple records.

Regards,
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 15, 2014 1:59 am
Reply with quote

When reading the JCL manual, remember that blocksize is one thing, and record-length something else entirely.

COBOL uses QSAM to write to tape.

If you were able to exceed the QSAM limit for tape, you'd have data which you could never write to disk, which would be a pain when testing, if nothing else.

Of course, since it is XML at some point and in some way it is likely to go to/from a webservice. That would be highly inconvenient if that needed a tape mount.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Jan 15, 2014 2:20 am
Reply with quote

You know, I think I remember a snippet of sample code in the COBOL XML parsing section... it was able to read XML in undefined chunks to deal with this exact problem.

The trick was to move the XML doc as a file, but then define the file as something normal, like FB 80. Then the parser would read records as needed to do its thing.

Seriously, check out the XML sections of the COBOL book.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts Using API Gateway from CICS program CICS 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
Search our Forums:

Back to Top