0

I need to develop one automation to get the row counts of the db2 table and print some more information through JCL.

Note:

Select count(*) from temp_table;
result: 120

I'm doing the automation for doing some modification in db2 table. The final step I need to print the number of rows got affected.

for eg: 120 rows are executed and the information has been sent

Please help me to write the code.

Peter Kraume
  • 2,610
  • 2
  • 14
  • 28
Prabhu G
  • 21
  • 3
  • Hi @Prabhu G, Welcome to SO! Could you please elaborate on what you're trying to acheive? Where would you want to show the counts? See this thread https://stackoverflow.com/questions/9599654/how-to-run-dymanic-sql-through-ikjeft01-utility to know how to run SQL query in batch using JCL. Usually, the SYSPRINT after running the JCL with SQL ```SELECT COUNT(*) . . .``` query, shows a message as ```SUCCESSFUL RETRIEVAL OF 1 ROW(S)```. You may store the SYSPRINT in a dataset and use it in the next step to extract necessary information. – Srinivasan JV Apr 04 '19 at 09:09
  • 1
    Well you can't do that with purely JCL. JCL is not a coding language, its just a set of statements that tell what mainframe what to run and how to run it. – SaggingRufus Apr 04 '19 at 15:38

0 Answers0