Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Undefined Report Program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
socker_dad

Active User


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

PostPosted: Fri Mar 30, 2018 1:45 am    Post subject: Undefined Report Program
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: 8410
Location: Dubuque, Iowa, USA

PostPosted: Fri Mar 30, 2018 2:15 am    Post subject: Reply to: Undefined Report Program
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: 158
Location: Seattle, WA

PostPosted: Fri Mar 30, 2018 2:25 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to process gdg in rexx program wh... pkmurali CLIST & REXX 12 Thu Dec 13, 2018 10:08 am
No new posts CICS program with Delay question MSTP CICS 2 Tue Dec 11, 2018 11:18 pm
No new posts COBOL D2 program execution without us... dipsybaby DB2 3 Mon Dec 10, 2018 2:08 pm
No new posts Writing multiple records into a CSV r... hiravibk DFSORT/ICETOOL 2 Wed Nov 07, 2018 2:35 pm
No new posts How to find if segment is read in any... Priyanka AR IMS DB/DC 12 Thu Sep 20, 2018 1:34 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us