View previous topic :: View next topic |
Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Thu Nov 15, 2007 4:28 pm Post subject: program unable to run with different record formats |
|
|
I have a program which reads from a VB File and the records are varying from 1 to 400 and parameters are below and the program is running fine.
Code: |
Organization . . . : PS
Record format . . . : VB
Record length . . . : 404
|
The same program needs to be run with an input file with FB and record length is 400 with parameters as below:
Code: |
Organization . . . : PS
Record format . . . : FB
Record length . . . : 400
|
When i ran the program i got the error as below:
Code: |
IGZ0204W A file attribute mismatch was detected. File A-FILE in program ABCDPGM 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 A-FILE in program ABCDPGM had a record length of 404 and the file specified in the ASSIGN clause had a record length of 400.
|
I understand the reason why the job has failed as the warnings suffices the cause.I want to know is there any way we can handle this kind of scenario / is it really possible to handle a single program with different organization. If this is not possible is it a design problem and how can it be solved.If it is possible how should i change my program or JCL.Please help me out. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Nov 15, 2007 4:32 pm Post subject: |
|
|
yadav2005,
COBOL is NOT yet there to handle VB/FB files with a single file declaration. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Thu Nov 15, 2007 7:18 pm Post subject: Re: program unable to run with different record formats |
|
|
yadav2005 wrote: | I have a program which reads from a VB File and the records are varying from 1 to 400 and parameters are below and the program is running fine.
Code: |
Organization . . . : PS
Record format . . . : VB
Record length . . . : 404
|
The same program needs to be run with an input file with FB and record length is 400 with parameters as below:
Code: |
Organization . . . : PS
Record format . . . : FB
Record length . . . : 400
|
When i ran the program i got the error as below:
Code: |
IGZ0204W A file attribute mismatch was detected. File A-FILE in program ABCDPGM 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 A-FILE in program ABCDPGM had a record length of 404 and the file specified in the ASSIGN clause had a record length of 400.
|
I understand the reason why the job has failed as the warnings suffices the cause.I want to know is there any way we can handle this kind of scenario / is it really possible to handle a single program with different organization. If this is not possible is it a design problem and how can it be solved.If it is possible how should i change my program or JCL.Please help me out. |
You define 2 FDs in the program an make both of them optional, 1 would be for the VB file and the other would be for the FB. If your input is VB then you would use the DD for the VB file definition otherwise use the DD for the FB file definition. |
|
Back to top |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Thu Nov 15, 2007 7:25 pm Post subject: |
|
|
Or just add a sort step to convert the FB file to VB. |
|
Back to top |
|
 |
|
|