View previous topic :: View next topic
|
Author |
Message |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
It's actually a simple reprt program( though not that simple to me:))
I have to read a file and based on some conditions i have to write. The report has two colum fields say Quality style and irregular style each with pic(7) with a space. So in all it takes 15bytes. In order to cut down on the size of this report I have to place multiple images (columns) of the data across the physical page. The detail information on the report will load in a column by column fashion beginning with the first column and will only proceed to subsequent columns if the number of detail entries dictate.
I tried writting the report and feel I can manage writting it but my problem lies in the fact that I do not how do I put the things supposed to be in the next page as one more column in the 1st page itself and so on till 4th page.
Regards,
Manjusha
I have been thinking of alternatives, I feel I need to define an array. Read my input file and load my table and write the report by taking it from the table....... wonder if this will work.... |
|
Back to top |
|
|
Purnendu.it
New User
Joined: 11 May 2007 Posts: 57 Location: chennai
|
|
|
|
hi manjusa,
well i think first u short the file you are reading and remove the duplicate
data if i am getting your question right.You have to design your
report layout in RD.If you want your page let say contain 16 records
design your report format in such a way.Or if you are using only
FD you have to do it by the logic.
But again why are you thinking again column wise.Its record miss not
column you have to read.
Quote: |
I tried writting the report and feel I can manage writting it but my problem lies in the fact that I do not how do I put the things supposed to be in the next page as one more column in the 1st page itself and so on till 4th page.
|
can you bit clear on the above quote. |
|
Back to top |
|
|
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
thnks purnendu...
wat I want is after the page is populated, I need to populate the next page. right....But in the report my 1st page shud contain report of 4pages
for this I need an array of 2 dimention.
like say
Q1S1(Of the 1st page) Q2S2(of 2nd page) Q3S3(of3rd page) .....
coming in together in 1 page....
looks like my client wants to save on paper:) |
|
Back to top |
|
|
Purnendu.it
New User
Joined: 11 May 2007 Posts: 57 Location: chennai
|
|
|
|
hi manjusha,
but u tell me how one can have records of three pages in 1 page.i hope
u are able to get it.can u provide some sample data for better clearification. |
|
Back to top |
|
|
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
I am really breaking my head on it....
actually, my report wud have 2 fields each with pic 7 with a space in between.....that way I am left with 132-15=117. I want to use the next 15bytes to have record of second page and so on.....I think I am not able to explain the requirement......
Thanks a zillion for the help.I have been a member of this forum for quite sometime but never posted anything untill yesterday. It really feels good that there are so many ppl to help. Thanks all..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Are you having success with your design & coding?
Can you show some sample input data and the output you want when it is processed? Remember that to preserve the alignment of the input and the output to post that part of yojr reply using the "Code" tab. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
manjusha.singh wrote: |
I think I am not able to explain the requirement...... |
Hi,
If you show the expected output, then, hopefully many of us would be able to understand your requirement better & can offer better suggestion/s.
In doing so, please use 'Code' Tab as suggested. |
|
Back to top |
|
|
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
Hi,
Thanks a lot....
I used array to get the report columwise...looks like it will work.....
I reading an input file based on some condition I am to generate this report. I have defined a 2 dimentional array and have populated it.
I plan to write it from the arrar onto my output file
Code: |
quality irreg quality irreg quality irreg quality irreg
style style style style style style style style
qualty style and irreg style is each of PIC X(7) with a space in between.
which is supposed to be in 1page. That way, now what I have is of 4 pages....
|
[/quote]
Now I am confused how to write my o/p from the array....I am not very good with looping either:) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Post your array, the output "print line" definition, and what code you have so far.
We will be able to help you make it work. |
|
Back to top |
|
|
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
thanks so much
Code: |
01 WS-SELECTION-RPT.
05 WS-SELECTION-ROW OCCURS 25 TIMES.
10 WS-SELECTION-COL OCCURS 17 TIMES.
15 WS-1ST-QUALITY-STYLE PIC X(7).
15 FILLER PIC X(1).
15 WS-IRREG-STYLE PIC X(7).
The following is my o/p layout but was wondering how wud I populate my o/p from the array....
FD IRRGREPT-FILE
RECORD CONTAINS 132 CHARACTERS
BLOCK CONTAINS 0 RECORDS
RECORDING MODE IS F
LABEL RECORDS STANDARD.
01 IRRGREPT-RECORD.
05 FILLER PIC X(15) VALUE SPACES.
05 WS-QUAL-STYLE-1ST PIC X(7).
05 FILLER PIC X(1) VALUE SPACES.
05 WS-IRRG-STYLE-1ST PIC X(7).
05 FILLER PIC X(14) VALUE SPACES.
05 WS-QUAL-STYLE-2ND PIC X(7).
05 FILLER PIC X(1) VALUE SPACES.
05 WS-IRRG-STYLE-2ND PIC X(7).
05 FILLER PIC X(14) VALUE SPACES.
05 WS-QUAL-STYLE-3RD PIC X(7).
05 FILLER PIC X(1) VALUE SPACES.
05 WS-IRRG-STYLE-3RD PIC X(7).
05 FILLER PIC X(14) VALUE SPACES.
05 WS-QUAL-STYLE-4TH PIC X(7).
05 FILLER PIC X(1) VALUE SPACES.
05 WS-IRRG-STYLE-4TH PIC X(7).
05 FILLER PIC X(15) VALUE SPACES. |
please let me know what shud be the o/p layout if this is not proper:)
it's a report....
will try to read some book over the weekend to be able to work on this on moday..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
For starters, i'd suggest making the output print line an "occurs 4" array (pretty much like you did the "selection-col" array but with a filler after each field to get the spacing you want on the report).
Then building a print line will just be a matter of pointing to the correct "sending field" and "receiving field". You would not need logic to determine whicn bit code for which receiving field name as you would use the "same" name rather than the -1st, -2nd, etc.
Also, values specified in an FD are either invalid or ignored, so a MOVE spaces to IRRGREPT-RECORD would be the start of each iteration of building an output line.
When you have some procedure code written, post that (both loading the array and building the print line).
Some of us monitor the forums over the weekend, so if you post anything, someone will see it fairly soon |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
First, please use [code] and [/code] tags,it makes your posts easier to read. For info use this link for BBCode.
The BBcode will maintain the spacing between characters in your examples.
Second, this sounds like a situation where you would to define your printline as a COBOL table. This would provide you a method to populate the report columns. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
hey dick, sorry for the duplication. I did not notice that this thread went to three pages. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Dick,
Re-enforcement is a good thing |
|
Back to top |
|
|
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
Thanks a lot,
I am done with the program.I used occurs for the o/p as well.....
Thanks so much for the help.
Regards,
Manjusha |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Good to hear that it is working properly - congrats! |
|
Back to top |
|
|
|