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

Difference between Compile-link-go and compile-link


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vedam

New User


Joined: 24 Apr 2007
Posts: 23
Location: India

PostPosted: Thu Apr 10, 2008 12:25 pm
Reply with quote

Hi,

Can you please let me know the difference between Compile-Link-go and Compile-Link?

Thanks
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Thu Apr 10, 2008 12:57 pm
Reply with quote

Hai

Is this Home Work :-)

Ok, Here is answer for your Question

To RUN Any application Program you should convert it into Machine Language(ie Executable instruction)

To do So

We will use JCL, The JCL will have 3 steps normally

1. COMPILATION STEP -
It will convert SOURCE(Say COBOL program) into OBJECT MODULE
(Its not executable intruction)

Ex; COBOL COMPILER - IGYCRCTL

2. LINAKGE STEP
This STEP will LINK EDIT OBJECT MODULE and will yield LOAD
MODULE(This is executable instruction)

3. RUN Step
This Step is used to RUN Application program(Mean in turn it will use LOAD MODULE)

Hope u clear
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 2:19 pm
Reply with quote

revel,

You have explained how to compile-link-run a cobol program. But i think OP was something different.

He wanted to know the difference between compile-link-go and compile-link.

Gng by the terms i think

compile-link-go -> Compile+link+run

compile-link -> Just compile and link.
Back to top
View user's profile Send private message
Vedam

New User


Joined: 24 Apr 2007
Posts: 23
Location: India

PostPosted: Thu Apr 10, 2008 2:48 pm
Reply with quote

Hi,

Thanks for your replies...

1. When you mean by 'Run (Go)' the application program, does it actually submit the JCl for program execution or something else?

2. During 'Link', the load module gets created permanently, right?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 10, 2008 3:18 pm
Reply with quote

Vedam,

1. compile/link/go is a job that has the three steps:
compile step
link step
exec pgm='your program'

you create the jcl and submit the job.

2. yes
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 10, 2008 3:44 pm
Reply with quote

compile link and go is just an abbreviation for a job that contains the compile, link and exec program (test the program) steps.

compile & link means a job that has only the compile and link steps. an additional job with the appropriate JCL to support the invocation of your program would be needed in the case.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 4:50 pm
Reply with quote

Dick,

Quote:
2. During 'Link', the load module gets created permanently, right?


Dick wrote:

Quote:
yes


It also depends on what is coded in the DISP parameter.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 10, 2008 5:27 pm
Reply with quote

Aaru, that is true, also depends whether the output dsn for the loadmodule is a temp (&&..) or a catlg ds.


but, if you want to be picky, which disp parm? I doubt if the OP knows what you are talking about.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Apr 10, 2008 5:54 pm
Reply with quote

For programs not requiring link (e.g., no subroutines), there is also compile-go, which uses the loader, rather than the link-editor.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 7:47 pm
Reply with quote

Dick,

Quote:
but, if you want to be picky, which disp parm? I doubt if the OP knows what you are talking about.


Hmm yes, even i don't think OP would have understood icon_sad.gif
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Fri Apr 11, 2008 12:08 pm
Reply with quote

Dear Phrzby Phil,

Quote:
For programs not requiring link (e.g., no subroutines), there is also compile-go, which uses the loader, rather than the link-editor


I completly disagree about this,

We must need LINK STEP(Having LINKER say IEWL/HEWL) for getting Load module.
In next that is GO Step, we will use created load module for RUN/EXECUTION

<Note: What i meant is At any cost Load module will be created>

If u want to bypass that STEP ie LINK STEP, U can Route load module to TEMPERUARY DATASET and Make use of That in GO STEP
Then it Will work

Hope u r getting
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: Fri Apr 11, 2008 1:17 pm
Reply with quote

Hello,

Quote:
If u want to bypass that STEP ie LINK STEP, U can Route load module to TEMPERUARY DATASET
Huh? This does not bypass the link step - it simply places the link output in a temporary dataset.

Quote:
I completly disagree about this,

We must need LINK STEP(Having LINKER say IEWL/HEWL) for getting Load module.
Maybe you just learned (or will have learned) something new. What if no load module is needed?

As was posted:
Quote:
For programs not requiring link (e.g., no subroutines), there is also compile-go, which uses the loader, rather than the link-editor.
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Fri Apr 11, 2008 4:11 pm
Reply with quote

dick scherrer,


What i meant is

Quote:
If u want to bypass that STEP ie LINK STEP, U can Route load module to TEMPERUARY DATASET


mean if i won't include LINK STEP in JCL, it will places load module in Temperuary Library and To run that pgm we should referback to a load module where it is created(ie Temperuary dataset)

Please See Sentence which i gaven above
Quote:
If u want to bypass that STEP ie LINK STEP, U can Route load module to TEMPERUARY DATASET and Make use of That in GO STEP
Then it Will work
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Apr 11, 2008 4:24 pm
Reply with quote

if You bypass the link/bind step You will not have a load module !

a load module is produced only by the linkage_editor/binder
any compiler produces only object format thing ( not executable )

a load module library has a recfm U ( undefined )
an object library ( output of a compilation ) has a recfm FB ( usually )
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Apr 11, 2008 6:01 pm
Reply with quote

Well, all I can say is that I do in fact run a compile-go proc, and it does not have a link-edit step. There is no load module as such stored in either a perm or temp dataset, as I do not need it - the loader (an IBM utility) simply creates a "load module" on the fly and runs it. Then it's gone.

If someone else says I have not been doing that, then what can I say?
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Wed Apr 16, 2008 10:25 am
Reply with quote

Hi all,

Quote:
Can you please let me know the difference between Compile-Link-go and Compile-Link


The COMPILE-LINK-GO will have three STEPS in a PROC where as COMPILE-LINK will have 2 STEPS in PROC

Find below differance between these 2

COMPILE-LINK-GO
_________________

Code:
//IGYWCLG PROC LNGPRFX='IGY.V2R1M0',SYSLBLK=3200,
// LIBPRFX='CEE',GOPGM=GO
//*
//* COMPILE, LINK EDIT AND RUN A COBOL PROGRAM
//*
//* PARAMETER DEFAULT VALUE USAGE
//* LNGPRFX IGY.V2R1M0
//* SYSLBLK 3200
//* LIBPRFX CEE
//* GOPGM GO
//*
//* CALLER MUST SUPPLY //COBOL.SYSIN DD ...
//*
//COBOL EXEC PGM=IGYCRCTL,REGION=2048K
//STEPLIB DD DSNAME=&LNGPRFX..SIGYCOMP,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,UNIT=VIO,
// DISP=(MOD,PASS),SPACE=(TRK,(3,3)),
// DCB=(BLKSIZE=&SYSLBLK)
//SYSUT1 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=VIO,SPACE=(CYL,(1,1))
//LKED EXEC PGM=HEWL,COND=(8,LT,COBOL),REGION=1024K
//SYSLIB DD DSNAME=&LIBPRFX..SCEELKED,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN
//SYSLMOD DD DSNAME=&&GOSET(&GOPGM),SPACE=(TRK,(10,10,1)),
// UNIT=VIO,DISP=(MOD,PASS)
//SYSUT1 DD UNIT=VIO,SPACE=(TRK,(10,10))
//GO EXEC PGM=*.LKED.SYSLMOD,COND=((8,LT,COBOL),(4,LT,LKED)),
// REGION=2048K
//STEPLIB DD DSNAME=&LIBPRFX..SCEERUN,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*


Here Load module will created in a STEP

Code:
//LKED EXEC PGM=HEWL,COND=(8,LT,COBOL),REGION=1024K

.
.
Code:
//SYSLMOD DD DSNAME=&&GOSET(&GOPGM),SPACE=(TRK,(10,10,1)),


So it is placing in a library &&GOSET ie Temperuary dataset

In GO STEP ie

Code:
//GO EXEC PGM=*.LKED.SYSLMOD,COND=((8,LT,COBOL),(4,LT,LKED)),


We are referback using a parameter called PGM=*.LKED.SYSLMOD --- So its pointing out to the load module library then it will RUN

COMPILE-LINK
_____________

Code:
//IGYWCLG PROC LNGPRFX='IGY.V2R1M0',SYSLBLK=3200,
// LIBPRFX='CEE',GOPGM=GO
//*
//* COMPILE, LINK EDIT AND RUN A COBOL PROGRAM
//*
//* PARAMETER DEFAULT VALUE USAGE
//* LNGPRFX IGY.V2R1M0
//* SYSLBLK 3200
//* LIBPRFX CEE
//* GOPGM GO
//*
//* CALLER MUST SUPPLY //COBOL.SYSIN DD ...
//*
//COBOL EXEC PGM=IGYCRCTL,REGION=2048K
//STEPLIB DD DSNAME=&LNGPRFX..SIGYCOMP,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,UNIT=VIO,
// DISP=(MOD,PASS),SPACE=(TRK,(3,3)),
// DCB=(BLKSIZE=&SYSLBLK)
//SYSUT1 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=VIO,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=VIO,SPACE=(CYL,(1,1))
//LKED EXEC PGM=HEWL,COND=(8,LT,COBOL),REGION=1024K
//SYSLIB DD DSNAME=&LIBPRFX..SCEELKED,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN
//SYSLMOD DD DSNAME=&&GOSET(&GOPGM),SPACE=(TRK,(10,10,1)),
// UNIT=VIO,DISP=(MOD,PASS)
//SYSUT1 DD UNIT=VIO,SPACE=(TRK,(10,10))


<HERE There is no GO STEP ie RUN STEP>

To RUN

You should write one JCL like

Code:
// job card
//STEP01 EXEC PGM=member name
//STEPLIB DD  DSN=load module library < which is created in LKED STEP and In SYSLMOD ddname
//SYSIN DD ....
//SYSOUT DD ....


Hope u clear
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts C Compile time time stamps Java & MQSeries 10
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Timestamp difference and its average ... DB2 11
Search our Forums:

Back to Top