MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

program unable to run with different record formats

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Thu Nov 15, 2007 4:28 pm    Post subject: program unable to run with different record formats Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Nov 15, 2007 4:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Thu Nov 15, 2007 7:18 pm    Post subject: Re: program unable to run with different record formats Reply with quote

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
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Thu Nov 15, 2007 7:25 pm    Post subject: Reply with quote

Or just add a sort step to convert the FB file to VB.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group