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: 153
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: 8280
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: 153
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
No new posts How to display offset thru cobol prog... tvinodkumar7 CICS 1 Sun Apr 22, 2018 8:42 pm
No new posts How do you attach a DB2 plan to a CIC... John Poulakos DB2 0 Wed Apr 18, 2018 1:49 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts Mantis Program Compiled? luis carlos CICS 2 Sat Apr 07, 2018 8:59 pm
No new posts java.io.FileNotFoundException - passi... Virendra Shambharkar Java & MQSeries 5 Mon Feb 26, 2018 11:41 am

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