IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it mandatory to have length of 133 for report files


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meghu2111

New User


Joined: 11 Mar 2008
Posts: 2
Location: Chennai

PostPosted: Fri Mar 21, 2008 6:31 pm
Reply with quote

Hi,
I am facing the problem while running the program, it going unending loop I think Actualy I am writing the records from two input files like if both data gets match I have to write that even it doesn't match then also I have to write but moving spaces to the first 20 columns . my first file had a lenghth of 200 and second one having 374. In first file I have data of length 51 and in second file I have to use only first 20 columns On the basis of the first 20 columns only I have to write .Can any body tell me is it mandatory to having length 133 for report files
thanks
Meghu
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 21, 2008 6:34 pm
Reply with quote

meghu2111 wrote:
Can any body tell me is it mandatory to having length 133 for report files


No, it's not. It can be whatever is required for the application, the output device, etc.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Mar 21, 2008 6:38 pm
Reply with quote

Megharaj,
Quote:
while running the program, it going unending loop

Please check your logic flow.

For this case, why don't you use SORT util?

Quote:
is it mandatory to having length 133 for report files

Either No or Yes based on your site standards.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 21, 2008 7:01 pm
Reply with quote

No it' s just an historical heritage... but only if You were rich icon_biggrin.gif

Once upon a time when the printers were line printers and their name was 1403 ( impact printers )

the customers had the option of buying/renting two models
one with 120 print positions - 121 with the control character
the other one with 132 positions - 133 with the control character

later on on the 3211 line printer there was also the possibility of getting a 150 chars per line model
with smaller chars

I would say that in IT like as in real life many thing happen for historical reasons
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Mar 21, 2008 11:19 pm
Reply with quote

Hi,

Little more, read it somewhere once
Quote:
A standard sheet of computer output paper is 11 x 13 7/8 inches. That's 11 inches from perf-to-perf, and 13 7/8 inches wide, including the tractor feeds.

An IBM-3211 impact printer uses a 10-pitch (10 CPI) print mechanism, much like a typewtriter. Given that you typically would want to remove the tractor feeds, which would take away about a half-inch of the paper's width, that would leave you with about 13.2 inches of printable surface. So, if you wish to completely fill the page from edge-to-edge, 132 10-pitch characters is just the right amount needed.


Hope this helps.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 22, 2008 12:23 am
Reply with quote

Hello,

Quote:
Can any body tell me is it mandatory to having length 133 for report files
No, it is not.

Quote:
if both data gets match I have to write that . . .
What is the "key" in each file that you are matching?

It sounds like you may be processing but skipping a read (and so never reach AT END).

If you are matching 2 files by some key, it is called a 2-file match/merge. Near the top of the cobol section, there is a "sticky" that is an example of a 2-file match/merge.

You might download the sample code and see how it compares to what you are doing/need to do. If you have any questions after reviewing the example, please post them here.
Back to top
View user's profile Send private message
saravana iyappan

New User


Joined: 31 Mar 2004
Posts: 6
Location: Seattle

PostPosted: Sat Mar 22, 2008 1:41 am
Reply with quote

No..It is not mandatory


Thanks
Saravana
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Sat Mar 22, 2008 8:18 am
Reply with quote

i think you are having different number of records in the two files and while reading the two files, your logic is not able to check the EOF of both the files.
before the file (for which, your program is checking for the EOF) reaches to the end, the other file is reaching to the EOF and your loop is not getting to the terminating condition.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Sat Mar 22, 2008 9:01 am
Reply with quote

Anuj -

I think you have dated yourself - a picture is nowadays worth 1024 words.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Sun Mar 23, 2008 5:04 am
Reply with quote

May be they've enhanced the feactures Phrzby but I still 'zip' them to 1000 only... icon_wink.gif
Back to top
View user's profile Send private message
meghu2111

New User


Joined: 11 Mar 2008
Posts: 2
Location: Chennai

PostPosted: Mon Mar 24, 2008 10:33 am
Reply with quote

thank you all
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top