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

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: 1767
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: 7313

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
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Need help in reading and validating a... ABINAYATHULASI COBOL Programming 8 Tue Apr 18, 2017 11:42 am
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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