|
|
| Author |
Message |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
The requirement is I have to read an input file, check for some if condition
and if the condition is satisfied I have to populate this report column by column.
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.(As per my specs)
I would like to know how to move the fields, how do I check for the EOF column, EOF page.
what other things are to be looked into. I have not been into coding anytime prior to this. I might come up with some very basic queries,
QS QS QS QS
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX XXXX
XXXX XXXX XXXX
XXXX XXXX XXXX
Thanks
Manjusha |
|
| Back to top |
|
 |
References
|
|
 |
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1478 Location: Bangalore,India
|
|
|
|
Manjusha,
Provide some examples for better understanding. Your requirement is not clear. |
|
| Back to top |
|
 |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
Thanks Murali,
I have to write a program which also has a report program. The specs tha I got says I need to populate the report column by column as i mentioned in my prev mail....oops looks like the alignment of my query changed in my post. QS is the field name of the report. There are 4 such field. After reading a flat file and based on some conditions I need to populate the fields.
let me know what kind of info do you need. Being new to it, I guess I am not able to put the query in a good order.....
Regards,
manjusha |
|
| Back to top |
|
 |
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1478 Location: Bangalore,India
|
|
|
|
manjusha,
| Quote: |
| I guess I am not able to put the query in a good order..... |
Instead of putting 'XXXX' values, why dont you give some real values and explain your req. |
|
| Back to top |
|
 |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
| Are we allowed to attach the spec in this forum..... |
|
| Back to top |
|
 |
Help-Me-Out
Active User
Joined: 09 Dec 2006 Posts: 54 Location: Pune
|
|
|
|
Manjusha,
Welcome to the forum. Please read the forum rules before posting anything on the forum. This is very important.
u r nt supposed to put the company docs on the forum. this will disclose company confidential things to public which company may not like. In worst case company may sack you. this only for ur information. u can ask moderator to remove the link frm the forum.
Explain your problem/query in short using some dummy data which helps members to understand the problem u r facing and give u solution on that. |
|
| Back to top |
|
 |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
| Thanks sandy for the info |
|
| Back to top |
|
 |
Help-Me-Out
Active User
Joined: 09 Dec 2006 Posts: 54 Location: Pune
|
|
|
|
Hi,
u can display the data columnwise in simple way.
define the cols in the WS section and move the data in the particular condition loop and write after moving that record.
like
01 REPORT.
03 COL1 PIC 9(2).
03 FILLER X(5).
03 COL2 PIC 9(2).
03 FILLER X(5).
03 COL3 PIC 9(2).
in conditional para.
MOVE 01 TO COL1
MOVE 02 TO COL2
MOVE 03 TO COL3
WRITE REPORT.
I think this solve ur purpose. |
|
| Back to top |
|
 |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
Hi,
Thanks a lot for your quick reply.
I had requested the moderators to remove the Specs.I can still see it:)
coming to my query, since it is report pgm, I wanted to know wud my pgm make sure that we have finished populating one column and get to the next column, so on and so forth...
Regards,
manjusha |
|
| Back to top |
|
 |
Purnendu.it
New User
Joined: 11 May 2007 Posts: 40 Location: chennai
|
|
|
|
hi,
I think what you are asking is not satisfying the coding standar of cobol.I guess if you are asking like..
suppose
empname no. add
a
b
c
i mean to say if you are asking to populate first column totally and then move to next column .is it like that? |
|
| Back to top |
|
 |
Purnendu.it
New User
Joined: 11 May 2007 Posts: 40 Location: chennai
|
|
|
|
hi Manjusha,
I think after reading the input file,Based on some condition you have to move 1st records or datas of specific column and then you can perform on
the second record and so on .I don't think you first populate the one
column then move to second and so on.Am i clear to you? |
|
| Back to top |
|
 |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
Thanks for your reply,
yes I need to populate the first column and then thenext column so on and so forth. I have four such columns....
what I had been thinking was reading the input file if the condition is satisfied I shall move the reqd record to a W.S.S variable say Q1S1 and then read the second record move it to Q2S2 and so on....and when Q4S4 is moved I will write the record. |
|
| Back to top |
|
 |
Purnendu.it
New User
Joined: 11 May 2007 Posts: 40 Location: chennai
|
|
|
|
Hi,
if i got your reply correctly as i said you have to perform operation on the
first record and then can move on to the second record.
like after reading the first record move the data in the corresponding ws variables Q1S1 to Q1S4.
And then write the record.afterward read the second record and perform the operatin.I think
you are more confused with the cobol coding than to requirement.Why are you confusing yourself to populate the first column then second and
so on.
see you can perform operation only on the record you are reading.
i guess you are clear with what is a record is in a cluster or file?
Am i clear to you.Base line is that You can perform operation on the
record which you have read that time. |
|
| Back to top |
|
 |
manjusha.singh
New User
Joined: 14 Jun 2005 Posts: 16 Location: bangalore
|
|
|
|
thanks a lot....
I am confused with requirement as well as the cobol coding I guess:)
My requirement is to ....my report will load column by column
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.(As per my specs) [/quote]
.....since it will load column by column I cant write it unless a page is complete...isn't it...
looks like I am confused and confusing others as well.... |
|
| Back to top |
|
 |
Help-Me-Out
Active User
Joined: 09 Dec 2006 Posts: 54 Location: Pune
|
|
|
|
Above logic will write all the cols at a time, so not worry abt individual cols  |
|
| Back to top |
|
 |
|
|