Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Writing a tape file of LRECL 260K via COBOL Program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Writing a tape file of LRECL 260K via COBOL Program
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

Site Director


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

PostPosted: Tue Jan 14, 2014 10:40 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7235

PostPosted: Tue Jan 14, 2014 11:51 pm    Post subject: Reply to: Writing a tape file of LRECL 260K via COBOL Progra
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: 1238
Location: Richfield, MN, USA

PostPosted: Wed Jan 15, 2014 12:11 am    Post subject:
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

Site Director


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

PostPosted: Wed Jan 15, 2014 12:23 am    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Wed Jan 15, 2014 12:23 am    Post subject:
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    Post subject: Reply to: Writing a tape file of LRECL 260K via COBOL Progra
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7235

PostPosted: Wed Jan 15, 2014 1:59 am    Post subject: Reply to: Writing a tape file of LRECL 260K via COBOL Progra
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us