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
 

 

Can a parm be passed to a proc to control an instream file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Div Grad

New User


Joined: 08 Apr 2005
Posts: 43

PostPosted: Wed Aug 26, 2009 2:46 am    Post subject: Can a parm be passed to a proc to control an instream file?
Reply with quote

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 **************


This is the proc:

Code:

//*----------------------------------------------------------*
//DVW2COPY PROC OUTNAME=DVWTEST,
//         DVWNAME=SPUD
//*
//*
//*----------------------------------------------------------*
//* DUMP ALL DVW TO COBOL COPYBOOK                           *
//*----------------------------------------------------------*
//STEP010 EXEC DDDUTLTY
//SYSPUNCH  DD DISP=OLD,DSN=CP2787.IDEAL.COPYLIB(&OUTNAME)
//SYSIN     DD *
-USR DATACOM-INSTALL,NEWUSER
-UTL LANGUAGE,COBOL
-UTL COPY,TABLE,&DVWNAME.(PROD),'CUT HERE'
-END
//*----------------------------------------------------------*
//* END OF PROC                                              *
//*----------------------------------------------------------*


The job bombs when I run:


Code:

13 XXSYSPUNCH  DD DISP=OLD,DSN=CP2787.IDEAL.COPYLIB(&OUTNAME)
   IEFC653I SUBSTITUTION JCL - DISP=OLD,DSN=CP2787.IDEAL.COPYLIB(DVWROB)
   X/SYSPUNCH DD DUMMY
14 XXSYSUDUMP DD SYSOUT=&SOUT
   IEFC653I SUBSTITUTION JCL - SYSOUT=*
15 XXSNAPER   DD SYSOUT=&SOUT
   IEFC653I SUBSTITUTION JCL - SYSOUT=*
16 XXDDSNAP   DD SYSOUT=&SOUT
   IEFC653I SUBSTITUTION JCL - SYSOUT=*
17 XXSYSIN     DD *
18 -USR DATACOM-INSTALL,NEWUSER
19 -UTL LANGUAGE,COBOL
20 -UTL COPY,TABLE,&DVWNAME.(PROD),'CUT HERE'
21 -END
   XX*----------------------------------------------------------*
   XX* END OF PROC                                              *
   XX*----------------------------------------------------------*

Code:

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.

Is that right and is there a way around that?
Back to top
View user's profile Send private message

Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Aug 26, 2009 3:19 am    Post subject:
Reply with quote

Thats right, no symbolic substitution in in stream data. And no DD * in a PROC, either.

Usually folks create a REXX or other utility to read a file of values, generate the JCL and submit it.
Back to top
View user's profile Send private message
Rishi Khare

New User


Joined: 13 Aug 2007
Posts: 16
Location: Mumbai

PostPosted: Mon Nov 02, 2009 5:28 pm    Post subject:
Reply with quote

Hi ,

I have a similar requirement for creating a copybook structure using SYSPUNCH as input .

Can we create DCLGEN in batch at run time .
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: Mon Nov 02, 2009 8:58 pm    Post subject:
Reply with quote

Hello Rishi,

Is there some reason your question is posted in the JCL part of the forum? Might it be better seved in the DB2 part of the forum?

Quote:
Can we create DCLGEN in batch at run time .
Please clarify what this is asking. I do not understand the question icon_confused.gif
Back to top
View user's profile Send private message
Rishi Khare

New User


Joined: 13 Aug 2007
Posts: 16
Location: Mumbai

PostPosted: Tue Nov 03, 2009 10:27 am    Post subject:
Reply with quote

Hi Dick,

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)

let me know if i have made myself clear.

Thanks,
Rishi
Back to top
View user's profile Send private message
Rishi Khare

New User


Joined: 13 Aug 2007
Posts: 16
Location: Mumbai

PostPosted: Tue Nov 03, 2009 10:31 am    Post subject: Re: Can a parm be passed to a proc to control an instream fi
Reply with quote

Div Grad wrote:
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.

Thanks,
Rishi
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: Tue Nov 03, 2009 10:36 am    Post subject:
Reply with quote

Hello,

That jcl and control statements are for CA-Datacom and use the Datacom DataDictionary Utility.

It is not at all related to db2/dclgen.
Back to top
View user's profile Send private message
Rishi Khare

New User


Joined: 13 Aug 2007
Posts: 16
Location: Mumbai

PostPosted: Tue Nov 03, 2009 10:41 am    Post subject:
Reply with quote

Hi Dick,

Thanks !!!
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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