View previous topic :: View next topic
|
Author |
Message |
meghu2111
New User
Joined: 11 Mar 2008 Posts: 2 Location: Chennai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
No it' s just an historical heritage... but only if You were rich
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
saravana iyappan
New User
Joined: 31 Mar 2004 Posts: 6 Location: Seattle
|
|
|
|
No..It is not mandatory
Thanks
Saravana |
|
Back to top |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Anuj -
I think you have dated yourself - a picture is nowadays worth 1024 words. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
May be they've enhanced the feactures Phrzby but I still 'zip' them to 1000 only... |
|
Back to top |
|
|
meghu2111
New User
Joined: 11 Mar 2008 Posts: 2 Location: Chennai
|
|
|
|
thank you all |
|
Back to top |
|
|
|