IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Compile JCLs for Static and Dynamic Call Cobol Programs


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raj_mainframe08

New User


Joined: 11 Sep 2007
Posts: 65
Location: Gurgaon

PostPosted: Sun Nov 16, 2008 1:21 am
Reply with quote

I use following JCL for compiling COBOL Programs involving no Calls. In the below JCL, i am compiling program DISPLAY1. Now I have written 2 COBOL programs wherein STATCC program is calling SUBPGM in static mode. Can someone please help me where and what changes i need to make in the following JCL to compile the above 2 Static Programs. Also what change i need to make in following Compile JCL if STATCC program is calling SUBPGM in dynamic mode

Code:
//TSUB481A JOB (METU5342,8200),'RAJIV',NOTIFY=&SYSUID,CLASS=D,
//      MSGCLASS=T,MSGLEVEL=(1,1)
//*********************************************************************
//*     COBOL/390 COMPILE
//*********************************************************************
//COMPSTEP   EXEC  PGM=IGYCRCTL,PARM=(AWO,DATA(24),DYNAM,FASTSRT,LIB,
//             MAP,LIST,RENT,TRUNC(OPT),VBREF,XREF)
//STEPLIB  DD  DSN=SYS1.IGY.SIGYCOMP,DISP=SHR
//SYSIN    DD  DSN=TSUB481.RAJIV.COBOL(DISPLAY1),
//         DISP=SHR
//SYSLIB   DD  DSN=NDVR.PROD.COPY,DISP=SHR
//         DD  DSN=SYS1.TRANSC.COPYLIB,DISP=SHR
//         DD  DSN=SYS1.MQM.SCSQCOBC,DISP=SHR
//         DD DISP=SHR,DSN=UHC.TPCOB2
//         DD DISP=SHR,DSN=UHC.USERCOPY
//         DD DISP=SHR,DSN=UHC.TPCOPY
//         DD DISP=SHR,DSN=SYS1.USERCOPY
//         DD DISP=SHR,DSN=SYS1.TPCOPY
//         DD DISP=SHR,DSN=SYS1.TRANSC.COPYLIB
//SYSPRINT DD  SYSOUT=*
//ABENDAID DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=D
//COBPRINT DD  SYSOUT=*
//SYSLIN   DD  DSN=&&LOADSET,DISP=(MOD,PASS),UNIT=SYSDA,
//             SPACE=(CYL,(5,1)),DCB=BLKSIZE=400
//SYSUT1   DD  UNIT=SYSDA,SPACE=(460,(1200,240),,,ROUND),
//             DSN=&&SYSUT1,DCB=OPTCD=Z
//SYSUT2   DD  UNIT=SYSDA,SPACE=(460,(1200,240),,,ROUND),
//             DSN=&&SYSUT2,DCB=OPTCD=Z
//SYSUT3   DD  UNIT=SYSDA,SPACE=(460,(1200,240),,,ROUND),
//             DSN=&&SYSUT3,DCB=OPTCD=Z
//SYSUT4   DD  UNIT=SYSDA,SPACE=(460,(1200,240),,,ROUND),
//             DSN=&&SYSUT4,DCB=OPTCD=Z
//SYSUT5   DD  UNIT=SYSDA,SPACE=(460,(1200,240),,,ROUND),
//             DSN=&&SYSUT5,DCB=OPTCD=Z
//SYSUT6   DD  UNIT=SYSDA,SPACE=(460,(1200,240),,,ROUND),
//             DSN=&&SYSUT6,DCB=OPTCD=Z
//SYSUT7   DD  UNIT=SYSDA,SPACE=(460,(1200,240),,,ROUND),
//             DSN=&&SYSUT7,DCB=OPTCD=Z
//*
//*********************************************************************
//* LINKEDIT
//*********************************************************************
//LKED       EXEC  PGM=IEWL,
//           COND=(4,LT,COMPSTEP),
//           PARM='AMODE(31),LIST,RENT,RMODE(ANY),XREF'
//SYSPRINT DD  SYSOUT=*
//ABENDAID DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=D
//SYSLIB   DD  DSN=SYS1.SCEELKED,DISP=SHR
//         DD  DSN=SYS1.COB2LIB,DISP=SHR
//         DD  DSN=SYS2.COBLIB,DISP=SHR
//SYSUT1   DD  UNIT=SYSDA,SPACE=(1024,(50,20),,,ROUND),DSN=&&SYSUT1,
//             DCB=OPTCD=Z
//SYSLIN   DD  DSNAME=&&LOADSET,DISP=(OLD,DELETE),DCB=BLKSIZE=400
//SYSLMOD  DD  DSN=TSUB481.RAJIV.LOAD(DISPLAY1),DISP=SHR


Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Nov 16, 2008 2:04 am
Reply with quote

Hello,

You need to talk with your system support people.

There is standard compile/link jcl for your system and this with the compiler options used at your site should be used. As these are site-specific, you should get this info locally.

You should not change the standard compile/link jcl.

One easy way to switch between a static and a dynamic call is to use a literal in the call (static) or use a working-storage variable in the call (dynamic).
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Nov 16, 2008 2:22 am
Reply with quote

Hi,

This is definetly a shop-specific question but I wonder why many of the shops still use such JCLs while we are available with version control tools (Change man, Endevour..) in market, complilation of program is just a matter of hitting couple of PF3 & Enter key - who is worried about whether it's a Dynamic or static CALL, it's just a COBOL program.Full Stop.

Pardon my ignorance - Are these tools such expensive ?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Nov 16, 2008 2:42 am
Reply with quote

Hi Anuj,

Most of my client sites do not use purchased version control tools for all of their applications yet. Some use nothing purchased at all because they have had version control for longer than the current products became standard (i've actually helped write a few many, many years ago). Lots of places recognized the need and dealt with it in the early 80's. Some are in transition from the "own code" to the currently available products. Already some of my places are looking into multi-platform tools so they can have common Configuration/Change Management group.

Quote:
who is worried about whether it's a Dynamic or static CALL, it's just a COBOL program.Full Stop
Different sites have different standards. There may be much concern whether code is called statically or dynamically. Static calls may cause "old" versions of a called module to be executed rather than the current version. Some places count on this. . . Dangerous (imho), but used more than just a few places.

The more sites/systems one deals with, the more one just shakes one's head at what are "the rules" there icon_confused.gif

Another interesting phenomenon is that when people start new with some organization (fresher) and stay there for years, they mistakenly "come to know"/understand that how that environment is managed is what it is like everywhere else. They often get quite a shock when they change organizations and find the system at the new organization is not like the one they have used. Surprise icon_wink.gif
Back to top
View user's profile Send private message
raj_mainframe08

New User


Joined: 11 Sep 2007
Posts: 65
Location: Gurgaon

PostPosted: Sun Nov 16, 2008 1:10 pm
Reply with quote

Hi,

Thanks for the answers

I agree that this is the site specific question. Thats why i have given the Compile JCL that i use to compile simple programs involving calls. As far as i know i need to add some DD statement which link the called program to the main program and i think that should not be site specific.

If anyone of you have the similar compile jcl like this which do compile the static called programs, i will try to modify my jlc as per that
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Nov 16, 2008 1:43 pm
Reply with quote

Quote:
Pardon my ignorance - Are these tools such expensive ?


SCLM is part of ISPF,

without getting into unpleasant comparisons,
with a good planning and setup it performs quite well
( I implemented it for fairly complex projects )
it does not have some of the facilities and frills of other products,
( going back and forth from new/old )
but for control, lock, build,promote, with multi CPU sharing of the control datasets
it shows a very good behavior and robustness
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Nov 16, 2008 1:46 pm
Reply with quote

Hello,

Quote:
As far as i know i need to add some DD statement which link the called program to the main program
You should need no additonal jcl to link called programs.

The same standard compile jcl may be used to compile both static or dynamic called modules. My people do this all the time with common compile jcl.

What has happened to cause you believe you need to change your jcl?

If some of what you've tried caused some error(s), it would be a good thing to post the error(s) including any error message ids. Post the complete message rather than selecting pieces to post.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top