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
 

 

IGZ0201W stumper

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Joseph Keyes

New User


Joined: 21 Oct 2010
Posts: 2
Location: Califon, NJ

PostPosted: Tue Nov 09, 2010 10:47 am    Post subject: IGZ0201W stumper
Reply with quote

Greetings,
I'm stumped with this problem and hoping that someone had some insight. I am attempting to read this variable flat file as input:
FD OLDXXX-FILE
RECORDING MODE V
BLOCK CONTAINS 0 RECORDS
RECORD CONTAINS 599 TO 16501 CHARACTERS
LABEL RECORDS ARE STANDARD.
01 OLD-XXX-REC.
(The record contains a fixed portion and 7 variable portions, all of which add up to 16501)

OPEN file statement results in:

IGZ0201W A file attribute mismatch was detected. File OLDXXX-FILE in program PGMXXX had a record length of 16505 and the file specified in the ASSIGN clause had a record length of 16501.

Input file charateristics are:
General Data
Management class . . : **None**
Storage class . . . : **None**
Volume serial . . . : XXXD45
Device type . . . . : 3390
Data class . . . . . : **None**
Organization . . . : PS
Record format . . . : VB
Record length . . . : 16501
Block size . . . . : 16505
1st extent cylinders: 90
Secondary cylinders : 8

BROWSE reveals that the largest record on the file is 16497 bytes.

Thanks in advance,
Joe
Back to top
View user's profile Send private message

Abhishek_Indore

New User


Joined: 20 Oct 2010
Posts: 6
Location: INDIA->US->UK

PostPosted: Tue Nov 09, 2010 11:33 am    Post subject:
Reply with quote

Hi Joe,

Hope below comments will help you.

IGZ0201W A file attribute mismatch was detected. File file-name in program program-name had a record length of record-length-1 and the file specified in the ASSIGN clause had a record length of record-length-2.

Explanation: The program file description specified a record length that
did not match the record length of the data set associated with the ASSIGN clause. The OPEN statement failed.

Programmer Response: For Format-V and Format-S files the maximum record length specified in your program must be exactly 4 bytes smaller than the length attribute of the data set. For Format-F files, the record length specified in your program must exactly match the length attribute of the data set
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 Nov 09, 2010 8:16 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

Basically, the compiler has provided the answer (unless you intend to change the process that creates the file. . .

You need to change the code to reflect the same length as the file.
Back to top
View user's profile Send private message
Joseph Keyes

New User


Joined: 21 Oct 2010
Posts: 2
Location: Califon, NJ

PostPosted: Tue Nov 09, 2010 8:31 pm    Post subject: IGZ0201W resolved
Reply with quote

Thanks Messers Singh and Sherrer. The problem was indeed an incorrect record length originating with the IDCAMS flat file creation process. The O/P file LRECL was max length instead of maxlength + 4. I revisited my comment: "BROWSE reveals that the largest record on the file is 16497 bytes." and it all fell into place.
Thanks again,
Joe
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Nov 09, 2010 8:40 pm    Post subject: Reply to: IGZ0201W stumper
Reply with quote

Take a look at this previous post -

http://www.ibmmainframes.com/viewtopic.php?p=250794&highlight=#250794

The example field WS-DR-LEN must be defined as a unsigned WS variable, your choice of data-type, but a binary-fullword is the best choice.

In the post, change the example RECORD CONTAINS to RECORD CONTAINS 599 TO 16501 CHARACTERS and name the length field to your choosing.

With that, technically you only need an 01 area defined as PIC X(16501) and after a READ, the unsigned length field will be set to the actual record-length.

This will work in COBOL2 and greater.

Bill
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 Nov 09, 2010 10:10 pm    Post subject: Reply to: IGZ0201W stumper
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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:



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