Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

conversion of REPORT generation from REPORT SEC to PROC Divi

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

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Thu Dec 29, 2011 4:49 pm    Post subject: conversion of REPORT generation from REPORT SEC to PROC Divi
Reply with quote

Hi,

I am trying to Generate a report by converting REPORT SECTION coding to PROCEDURE DIVISION Coding.

I need some light on REPORT SECTION keywords like TYPE IS CONTROL FOOTING.


I have below statements in the REPORT SECTION in a program:

TYPE IS CONTROL FOOTING FINAL
TYPE IS CONTROL FOOTING WS-COMPANY NEXT GROUP NEXT PAGE
EMP-BREAK TYPE IS CONTROL FOOTING WS-EMP-NO.
TYPE IS CONTROL FOOTING WS-ZIP.
TYPE IS CONTROL FOOTING WS-NAME.
EMP-DATE-BREAK TYPE IS CONTROL FOOTING WS-EMP-DATE.
05 LINE NUMBER IS PLUS 1.
10 COLUMN 27 PIC 9(5) SOURCE IS WS-ZIP.
10 COLUMN 36 PIC ZZZ999999 SOURCE IS WS-EMP-NO.
10 COLUMN 53 PIC X(10) SOURCE IS WS-EMP-DATE.
10 COLUMN 67 PIC X(22) SOURCE IS WS-NAME.
10 COLUMN 90 PIC Z,ZZZ,ZZZ.99- SUM WS-TOT-SALARY.

All I want to know is how these statements can be converted into PROCEDURE DIVISION statements.

I tried looking into some materail. But could not really understand. May not looking at proper material.

Please help





THere are 5 columns and last column has a SUM key word on it.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Dec 29, 2011 5:13 pm    Post subject: Reply to: conversion of REPORT generation from REPORT SEC to
Reply with quote

So you are going from the Cobol Report Writer to a Cobol program to produce the report without the Report Writer.

Do you not have a specification for the original report? An example of the report?

All the stuff you mention is to do with what to do when a "key" changes. The FOOTING stuff is just the bottom of the page for information at different levels of "control".

If you search for the Cobol Report Writer manual, you should find it all quite easy to follow.
Back to top
View user's profile Send private message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Thu Dec 29, 2011 5:30 pm    Post subject:
Reply with quote

Hi, Thanks for the reply.
Yes, we are going to take out REPORT WRITER code and replace it with PROCEDURE Division code.

Can you please eloborate more on "WHEN KEY CHANGES"?
Do i need to include name in the key-break for the last CONTROL statement when i convert it to PROCEDURE DIVISION statement?

I get different output with PRODUCTION code - report writer and Test code - after conversion.

Trying to find the Root Cause.

REPORT EXAMPLE:
Trying to generate report that has EMP-NO, ZIP, NAME, DOJ-DATE, SALARY AND FINALLY AT THE FOOTING SUMMARY OF SALARY IF DOJ-DATE-CCYY-MM IS EQUAL TO 201012. tHERE ARE 5 LINES OF HEADING TO THIS.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Dec 29, 2011 5:40 pm    Post subject: Reply to: conversion of REPORT generation from REPORT SEC to
Reply with quote

Did you find the manual I suggested? Try here.

Say you have a report that is sequenced by Company, Branch and Date. You want end-of-day totals. Company, Branch and Date are your CONTROL fields, because, logically, you need totals if the Date is the same but the Branch is different, if if Date and Branch are the same but Company is different. You also might like FINAL totals, depends on the data.

In your Cobol program, you have to write code for all of that. In the Report Writer, you just make the definitions and the rest is done for you.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Dec 30, 2011 10:12 am    Post subject:
Reply with quote

Hello,

Quote:
All I want to know is how these statements can be converted into PROCEDURE DIVISION statements.
There is no one-to-one standard COBOL statement conversion available (as far as i know).

Several of the Report Writer statements will cause multiple working-storage data items to be created as well as the procedure division code to use these variables.

Suggest you consider running a test of the existing code with a Very Small amount of input data. Understand what is produced from the test data. Then write the specification to re-write theis in standard COBOL. Code and test the new code with increasing amounts of data once the initial testing is complete/correct.
Back to top
View user's profile Send private message
Kranthi M

New User


Joined: 07 Oct 2011
Posts: 20
Location: India

PostPosted: Fri Dec 30, 2011 5:21 pm    Post subject:
Reply with quote

Thanks for the Reply. I was just trying to understand what a CONTROL FOOTING with BREAK means. From a REPORT WRITER material I found that its kind of KEY BREAK and we are supposed to nest conditions as many CONTROL statements as we have.

Trying to code it accordingly. Will get back, If I still have issues.
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 SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Jcl pram vs proc parms ashek15 JCL & VSAM 3 Thu Mar 30, 2017 6:50 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us