View previous topic :: View next topic
|
Author |
Message |
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 |
|
|
|