View previous topic :: View next topic
|
Author |
Message |
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
Hi,
I have written a cobol program. My Input file is a varialble record length file. And the output file which i am going to create is a fixed length file.
I have defined the files as below in my program.
Code: |
ENVIRONMENT DIVISION.
*+*+*+*+*+*+*+*+*+*+*+
INPUT-OUTPUT SECTION.
*=====================
FILE-CONTROL.
SELECT IDOC-FILE ASSIGN TO IDOC
ORGANIZATION IS SEQUENTIAL
FILE STATUS WW-IDOC-STATUS.
SELECT ODOC-FILE ASSIGN TO ODOC
ORGANIZATION IS SEQUENTIAL
FILE STATUS WW-ODOC-STATUS.
FILE SECTION.
*=============
FD IDOC-FILE
LABEL RECORDS ARE STANDARD
RECORDING MODE IS V
BLOCK 0 RECORDS
RECORD CONTAINS 27 TO 204 CHARACTERS.
01 IDOC-REC PIC X(204).
FD ODOC-FILE
LABEL RECORDS ARE STANDARD
RECORDING MODE IS F
BLOCK 0 RECORDS.
01 ODOC-REC PIC X(80). |
Code: |
READ IDOC-FILE INTO IDOC-REC |
I am getting 2 errors which i have pasted below.
Error 1:
IGZ0204W A file attribute mismatch was detected. File IDOC-FILE in program DOCONE was defined as RECORDING MODE V and the file specified in the ASSIGN clause did not contain the same attribute.
IGZ0201W A file attribute mismatch was detected. File IDOC-FILE in program DOCONE had a record length of 208 and the file specified in the ASSIGN clause had a record length of 204.
IGZ0201W A file attribute mismatch was detected. File ODOC-FILE in program DOCONE had a record length of 80 and the file specified in the ASSIGN clause had a record length of 204.
And when I read the record using
Code: |
READ IDOC-FILE INTO IDOC-REC |
i get the error message :
130 IGYPA3043-E Data-item "IDOC-REC (ALPHANUMERIC)" and record "IDOC-REC (ALPHANUMERIC)" had overlapping storage. Movement of data may not occur at execution time.
Thanks a lot in advance for the advice.
Cheers. |
|
Back to top |
|
|
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
One more information is, when the file is opened during program execution, I get return code 39. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
When using Variable length file, you need to consider adding 4 bytes extra to store variable record length. |
|
Back to top |
|
|
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
Murali ,
The 39 file status error may be due to the mismatch of the lrecl for your physical and logical file , but let me know one thing u have given a statement like
READ IDOC-FILE INTO ODOC-REC
the target lrecl is 80 and the source lrecl is 204 if u execute this won't it give u a S0C4 abend ... Let us know the progress anyways
Cheer's,
Thamilzan |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Code: |
FD IDOC-FILE
LABEL RECORDS ARE STANDARD
RECORDING MODE IS V
BLOCK 0 RECORDS
RECORD CONTAINS 27 TO 204 CHARACTERS.
01 IDOC-REC PIC X(208).
01 IDOC-REC-2 PIC X(27).
FD ODOC-FILE
LABEL RECORDS ARE STANDARD
RECORDING MODE IS F
BLOCK 0 RECORDS.
01 ODOC-REC PIC X(80). |
Quote: |
READ IDOC-FILE INTO IDOC-REC |
Into "IDOC-REC"? If you want the data in IDOC-REC, do not us the into.
Quote: |
IGZ0204W A file attribute mismatch was detected. File IDOC-FILE in program DOCONE was defined as RECORDING MODE V and the file specified in the ASSIGN clause did not contain the same attribute.
IGZ0201W A file attribute mismatch was detected. File IDOC-FILE in program DOCONE had a record length of 208 and the file specified in the ASSIGN clause had a record length of 204. |
These should be taken care of by the changes above in the 01 record definitions.
Quote: |
IGZ0201W A file attribute mismatch was detected. File ODOC-FILE in program DOCONE had a record length of 80 and the file specified in the ASSIGN clause had a record length of 204. |
This sounds like your jcl may incorrect. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Can you please put the jcl for this? |
|
Back to top |
|
|
|