Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New COBOL programmer needs Report Writer help

Status
Not open for further replies.

butler

MIS
Oct 12, 1998
88
0
0
US
I need to make a change to an old cobol report that made use of 'Report Writer' the RD looks like this:<br>
<br>
RD REPORT-OUT<br>
CONTROLS FINAL, W-IWR-WARE, W-IWR-ITEM,<br>
PAGE 66 LINES,<br>
FIRST DETAIL 6<br>
LAST DETAIL 63.<br>
<br>
I need to modify the program to print either the report shown, or a new report, sorted by ITEM, then WARE, based on a run-time switch:<br>
<br>
RD REPORT-OUT-2<br>
CONTROLS FINAL, W-IWR-ITEM, W-IWR-WARE,<br>
PAGE 66 LINES,<br>
FIRST DETAIL 6<br>
LAST DETAIL 63.<br>
<br>
My question is, how do I do this without repeating all of 01 and TYPE clauses, etc? Can I point both of these RD's to the same report definition?<br>
<br>
Much Thanks to anyone who can help!
 
Since you're sorting this report, try creating "generic" sort keys (in your SD) for ITEM and WARE (e.g. SRT-KEY1, SRT-KEY2). Then, depending on your run-time switch, move the appropriate field to SRT-KEY1 and SRT-KEY2. In that way you can get by with just one RD.<br>
<br>
Example:<br>
<br>
RD REPORT-OUT<br>
CONTROLS FINAL, SRT-KEY1, SRT-KEY2<br>
PAGE 66 LINES,<br>
FIRST DETAIL 6<br>
LAST DETAIL 63
 
Since you're sorting this report, try creating "generic" sort keys (in your SD) for ITEM and WARE (e.g. SRT-KEY1, SRT-KEY2). Then, depending on your run-time switch, move the appropriate field to SRT-KEY1 and SRT-KEY2. In that way you can get by with just one RD.<br>
<br>
Example:<br>
<br>
RD REPORT-OUT<br>
CONTROLS FINAL, SRT-KEY1, SRT-KEY2<br>
PAGE 66 LINES,<br>
FIRST DETAIL 6<br>
LAST DETAIL 63
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top