Page 1 of 1

Report generation...

PostPosted: Mon Nov 05, 2012 12:44 pm
by slaxman9
I have two files, one is emp file and second is dept file.
In first file (emp file) i have emp Id , empname, dept name and second file(dept file) i have dept id, dept name.

Now i have to generate a report with empid, empname, dept name.???

Can any one help me on this???

Re: Report generation...

PostPosted: Mon Nov 05, 2012 12:57 pm
by Pandora-Box
Slaxman

You already have the details in Emp file

Please let us know the correct details

Re: Report generation...

PostPosted: Mon Nov 05, 2012 1:02 pm
by slaxman9
slaxman9 wrote:I have two files, one is emp file and second is dept file.
In first file (emp file) i have emp Id , empname, dept name and second file(dept file) i have dept id, dept name.

Now i have to generate a report with empid, dept name.???

Can any one help me on this???

Re: Report generation...

PostPosted: Mon Nov 05, 2012 1:11 pm
by Pandora-Box
Still you have the details in Emp file

All you need to do is Read emp file populate empid and dept name to Ws section write report using that

Still I doubt your requirement

Re: Report generation...

PostPosted: Mon Nov 05, 2012 3:22 pm
by Robert Sample
If you have dept name in the emp file as you have posted, you read a record, move the data to a print line, write the report file from the print line, and continue until end of file.

If, as is more likely, you have dept id in the emp file, then you first read all dept file records into a table in WORKING-STORAGE. You then read each record of the emp file, search the table for the dept id (which you can do yourself or use the SEARCH verb in COBOL) and use the associated dept name in the print line.

Note that we will help you on this forum, but this is NOT a write-the-code-for-you forum. If you want code written for you, be prepared to pay the daily rate for whoever agrees to write the code (and daily rates are typically 500 to 1000 U.S. dollars per day).