I have this job that'll convert a specified dataview of a table into a COBOL copybook:
Code:
***************************** Top of Data ***************************
//RJMDVWDP JOB (NA7Z7M01),'NAOTB70',CLASS=0,MSGCLASS=J,
// NOTIFY=&SYSUID
//*
//*
//*-----------------------------------------------------------------*
//* DUMP ALL DVW TO COBOL COPYBOOK *
//*-----------------------------------------------------------------*
//STEP010 EXEC DDDUTLTY
//SYSPUNCH DD DISP=OLD,DSN=CP2787.IDEAL.COPYLIB(DVWTEST)
//SYSIN DD *
-USR DATACOM-INSTALL,NEWUSER
-UTL LANGUAGE,COBOL
-UTL COPY,TABLE,SHP-SC(PROD),'CUT HERE'
-END
//*-----------------------------------------------------------------*
//* END OF JOB *
//*-----------------------------------------------------------------*
It works fine. Now I have a slew of dataviews to convert so I want to make a proc where I call the above step. In the above what I want to vary from call to call is the output destination (DVWTEST in the PDS) and the table name (SHP-SC). So I ended up making this JCL to call a new proc:
Code:
********************************* Top of Data ****************
//DBISORT JOB (NA7Z7M01),'DBI SORT ',CLASS=0,MSGCLASS=J,
// NOTIFY=&SYSUID
//*----------------------------------------------------------*
//* DUMP A DATAVIEW *
//*----------------------------------------------------------*
//LIBRARY JCLLIB ORDER=(CP2787.IDEAL.PROCLIB)
//*
//*
//*----------------------------------------------------------*
//* EXPLANATION HERE OF VARIOUS INPUTS *
//*----------------------------------------------------------*
//DVW2COPY EXEC DVW2COPY,
// OUTNAME=DVWROB,
// DVWNAME=SHP-SC
//*----------------------------------------------------------*
//* END OF JOB *
//*----------------------------------------------------------*
******************************** Bottom of Data **************
STMT NO. MESSAGE
3 IEFC001I PROCEDURE DVW2COPY WAS EXPANDED USING PRIVATE LIBRARY CP2787.
3 IEFC657I THE SYMBOL DVWNAME WAS NOT USED
5 IEFC001I PROCEDURE DDDUTLTY WAS EXPANDED USING SYSTEM LIBRARY SYS3.PRO
8 IEFC002I INCLUDE GROUP DBMUFD#S WAS EXPANDED USING SYSTEM LIBRARY SYS3
17 IEFC601I INVALID JCL STATEMENT
18 IEFC601I INVALID JCL STATEMENT
19 IEFC601I INVALID JCL STATEMENT
20 IEFC601I INVALID JCL STATEMENT
21 IEFC601I INVALID JCL STATEMENT
I think I've run into this problem before and given up: It looks like I can not use a parm in an instream file in a proc. On the otherhand the OUTNAME parm works fine.
I have a feel that the topic being discussed above is very similar to what my requirement is.
Well for the DCLGEN part ...
I need to create a JCL thru which i just pass in the Table name and The DB2 subsystem name and in result i get the cobol equivalent data declaration of the fields ( i.e. a DCLGEN but in Batch mode)
I have this job that'll convert a specified dataview of a table into a COBOL copybook:
Code:
***************************** Top of Data ***************************
//RJMDVWDP JOB (NA7Z7M01),'NAOTB70',CLASS=0,MSGCLASS=J,
// NOTIFY=&SYSUID
//*
//*
//*-----------------------------------------------------------------*
//* DUMP ALL DVW TO COBOL COPYBOOK *
//*-----------------------------------------------------------------*
//STEP010 EXEC DDDUTLTY
//SYSPUNCH DD DISP=OLD,DSN=CP2787.IDEAL.COPYLIB(DVWTEST)
//SYSIN DD *
-USR DATACOM-INSTALL,NEWUSER
-UTL LANGUAGE,COBOL
-UTL COPY,TABLE,SHP-SC(PROD),'CUT HERE'
-END
//*-----------------------------------------------------------------*
//* END OF JOB *
//*-----------------------------------------------------------------*
It works fine. Now I have a slew of dataviews to convert so I want to make a proc where I call the above step. In the above what I want to vary from call to call is the output destination (DVWTEST in the PDS) and the table name (SHP-SC). So I ended up making this JCL to call a new proc:
Hi Div,
I need a simillar kind of a JCl to create a copybook structure for a DB2 table's view.
Can you pass me the same JCL.