How to generate a report.
Moderators: Frank Yaeger, DikDude, Moderator Group
How to generate a report.
HI,
Using a cobol program i am updating some tables, I want to create a report which contains the changes made.
Please help me.
Thanks.
Amol Pawar
Using a cobol program i am updating some tables, I want to create a report which contains the changes made.
Please help me.
Thanks.
Amol Pawar
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
HI,
I am having a cobol program in which one table gets updated.
Query
UPDATE ABC
SET
APP_CDE = '200',
ROW_TM = '%TIMESTAMP%'
UID = '%USER_ID%',
WHERE
BUS_CDE = 200;
This program runs daily with different update queries I want to create a report on the basis of this query.
How to get all the details, what is updated in the table.
Thanks,
Amol
I am having a cobol program in which one table gets updated.
Query
UPDATE ABC
SET
APP_CDE = '200',
ROW_TM = '%TIMESTAMP%'
UID = '%USER_ID%',
WHERE
BUS_CDE = 200;
This program runs daily with different update queries I want to create a report on the basis of this query.
How to get all the details, what is updated in the table.
Thanks,
Amol
if you have only this query.. then it is clear that rows updated where BUS_CDE = 200.. you can write the same in the report.
if you want to write what is the previous state of data base , before updation.. then first use select based on BUS_CDE = 200.. write it to o/p.
do update...
select the records again with BUS_CDE = 200 .. write it to 0/p.
value 200, may change based on input...
if you want to write what is the previous state of data base , before updation.. then first use select based on BUS_CDE = 200.. write it to o/p.
do update...
select the records again with BUS_CDE = 200 .. write it to 0/p.
value 200, may change based on input...
Natarajan
Chennai
Chennai
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
what you mean to say is:How to get all the details, what is updated in the table.
how to obtain the before data.
as Natarajan has suggested,
use an update cursor,
FETCH (to obtain before values) - output your details
update current
loop to fetch
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page