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
 

 

Mismatch between input file and output file record length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
tkirankumar

New User


Joined: 21 Nov 2007
Posts: 3
Location: chennai

PostPosted: Sun Apr 01, 2012 12:21 am    Post subject: Mismatch between input file and output file record length
Reply with quote

Hi Friends,

I have a flat input file length 200 bytes. This file I am writing it to output file of length 230 bytes will I get any error.

Regards
Kiran
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Sun Apr 01, 2012 1:01 am    Post subject: Reply to: Mismatch between input file and output file record
Reply with quote

If you do it properly, it won't be a problem.
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: Sun Apr 01, 2012 3:01 am    Post subject:
Reply with quote

Hello,

Once you have this running, suggest that the "extra" 30 bytes do not contain "junk". These bytes should contain the same value (i.e. spaces).
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Sun Apr 01, 2012 2:28 pm    Post subject: Reply to: Mismatch between input file and output file record
Reply with quote

If your output file is 230 bytes (LRECL=230), you have also specified this lenght in your FD in your COBOL program. This is the reford-length you always write to this file. If you "use" only 200 of the 230 bytes, thats a program logic issue.
If you have an mismatch in the size between the program and the file, you will have a U4038 abend and File Status 39.
Assuming this is a RECFM=FB-file.
Why dont you just test this in your own environment!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Sun Apr 01, 2012 2:52 pm    Post subject:
Reply with quote

It does really depend upon what is hapenning between the read of a record and the write of that record. And file definitions. What happened when you tried? Giving this information will help us analyse your problem.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Sun Apr 01, 2012 3:35 pm    Post subject: Reply to: Mismatch between input file and output file record
Reply with quote

"will I get any error?" is a question for Beginners and Students.

It comes down to a Yes/No guess. Given that such a question was asked here, I'd "guess" the answer to the question is "Very Yes"*.

* With due apologies to Bootsy Collins and Bootsy's Rubber Band
Back to top
View user's profile Send private message
tkirankumar

New User


Joined: 21 Nov 2007
Posts: 3
Location: chennai

PostPosted: Mon Apr 02, 2012 8:51 pm    Post subject: Reply to: Mismatch between input file and output file record
Reply with quote

Hi Friends,

Its an interview question asked in one of the interview. I wanted to know the different views and opnions. Thank you for your responses.

Regards
Kiran
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 03, 2012 6:02 pm    Post subject: Re: Mismatch between input file and output file record lengt
Reply with quote

tkirankumar wrote:
I have a flat input file length 200 bytes. This file I am writing it to output file of length 230 bytes will I get any error.
As worded - there should not be any problem; provided everything else, such as FD definition (as Peter and Nic also indicate), is precisely correct.

And if this was the only question from the interviewer, you should have investigated a bit more.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 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 How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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