IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Undefined Report Program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Fri Mar 30, 2018 1:45 am
Reply with quote

This one is a doozy icon_sad.gif .

My boss wants me to write a "dynamic" report program that can produce any myriad of reports based on card control and header table data. The control card specifies the report type; the database table the row headings for that particular report. The rest of the criteria is:

1. In a cursor, read all the rows from a table that meets given specifications. The is 158 columns of indeterminate number of rows. These rows have data definitions of alphanumeric, S9 comp, S9 comp-3.

2. (Maybe not simultaneously) In a second cursor, get the report fields, headings and row layout. The number of columns and column headings are derived from this table.

3. Create the report as specified by the second cursor. The report can be as few as 1 column up to the full 158 columns. Prior to reading the second cursor, there is no way to know what report is to be generated, so there can be no fixed report layout.

4. The data in the report is to be displayed in a readable output, so the COMP and COMP-3 fields are to be displayed in their translated format so users can read them. Basically, he wants the report to resemble a SPUFI report separated by semicolons.

How do you do this???? I understand and can do everything but producing the report lines. If you concatenate the row data, how do you keep the semicolons aligned? Any help would be greatly appreciated!

I swear this is a real live project (although I think my boss just wants to see if I can do it).
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Mar 30, 2018 2:15 am
Reply with quote

Reference modification -- define a report line and move in the needed data by columns. You'll need to move COMP and COMP-3 variables to a numeric edited variable before moving to the output line.

Many employers back, I did something similar. The row names and column titles were parameterized as were how to lay out the data on the report line. It took a while to get the output right, but once we did I demonstrated to my boss how we could completely change the layout of the report just by changing the parameters. He was quite happy with it.
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Fri Mar 30, 2018 2:25 am
Reply with quote

Lovely! Sounds like a solid approach.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top