Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
When should NCAL be used in SCLM?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 268
Location: China

PostPosted: Tue Jun 30, 2009 1:43 pm    Post subject: When should NCAL be used in SCLM?
Reply with quote

hi,
I have a program named 'LJ84STR1', which calls another sub program named 'STRUCT'.

If I define ARCHDEF like this, REC=0 for compile, but it abends when the PGM runs.

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
********************************* データの始め *************************
LKED     LINKE                        * LINKAGE                      * 
LOAD     LJ84STRU  LMOD                * LOAD MODULE                  *
INCL     LJ84STR1  ARCHNCL             * PLI SOURCE                   *
INCL     STRUCT    ARCHNCL             * PLI SOURCE                   *
CMD      INCLUDE   SYSLIB(DSNELI)                                       
CMD      INCLUDE   SYSLIB(CSQBSTUB)                                     
********************************* データの終り *************************

ARCHNCL for LJ84STR1 is defined as following:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** データの始め *****************************
*---------------------------------------------------------------------*
* MEMBER NAME      : LJ84STR                                          *
* DEFINITION TYPE  : LEC ARCHITECTURE DEFINITION                      *
* DESCRIPTION      : DEFINE BATCH EXECUTABLE LOAD MODULE              *
*  (NO DLI CALL)                                                      *
*---------------------------------------------------------------------*
LKED     LINKNE                        * LINKAGE                      *
LOAD     LJ84STR1  NCAL                * NCAL                         *
INCLD    LJ84STR1  PLI                 * PLI SOURCE                  * 
**************************** データの終り   ****************************



But if I change the ARCHDEF like below, both compile and run is processed smoothly.
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** データの始め *****************************
LKED     LINKE                        * LINKAGE                      * 
LOAD     LJ84STRU  LMOD                * LOAD MODULE                  *
INCLD    LJ84STR1  PLI* PLI SOURCE                                     
INCL     STRUCT    ARCHNCL             * PLI SOURCE                   *
CMD      INCLUDE   SYSLIB(DSNELI)                                       
CMD      INCLUDE   SYSLIB(CSQBSTUB)                                     
**************************** データの終り   ****************************


I'm confused with the usage of NCAL, if the main file cannot be defined with NCAL?

Can you tell me when NCAL should be used?

Thanksl
Back to top
View user's profile Send private message
References
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 5391
Location: italy

PostPosted: Tue Jun 30, 2009 1:55 pm    Post subject: Reply to: When should NCAL be used in SCLM?
Reply with quote

NCAL should be used for statically called subroutines
but this is a general concept

for executable objects NCAL should not be specified
specifying it will not trigger the linkage editor automated serch for called subroutines

customizing SCLM object types
provision should have already been made for them
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 4223
Location: Atlanta, GA

PostPosted: Tue Jun 30, 2009 3:07 pm    Post subject:
Reply with quote

From the HLASM Programmer's Guide:
Quote:
When you use the no automatic library call option (NCAL), the binder does not search for library members to resolve external references.
So if you use NCAL, your run-time STEPLIB must include every library which has modules your program calls -- including the system modules included during your compile which you may not have been aware were included. If you don't use NCAL, then the linkage editor (binder) must have concatenated SYSLIB data sets that resolve the external references. Compile time or run time, one way or the other, the libraries must be provided at some point or your program will abend.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 268
Location: China

PostPosted: Tue Jun 30, 2009 3:52 pm    Post subject:
Reply with quote

Thanks for your specification to NCAL.
I understood why NCAL cannot be executed by JCL directly.
But for the following ARCHDEF, I want to build a LMOD called LJ84STRU from two NCAL,
one main (LJ84STR1), can one sub (STRUCT).
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
********************************* データの始め *************************
LKED     LINKE                        * LINKAGE                      * 
LOAD     LJ84STRU  LMOD                * LOAD MODULE                  *
INCL     LJ84STR1  ARCHNCL             * PLI SOURCE                   *
INCL     STRUCT    ARCHNCL             * PLI SOURCE                   *
CMD      INCLUDE   SYSLIB(DSNELI)                                       
CMD      INCLUDE   SYSLIB(CSQBSTUB)                                     
********************************* データの終り *************************


when I execute the PGM LJ84STRU, job still abends.

So, I cannot directly build PGM with two NCAL, right?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 5391
Location: italy

PostPosted: Tue Jun 30, 2009 3:56 pm    Post subject: Reply to: When should NCAL be used in SCLM?
Reply with quote

what kind of abend ???
what is the return code of the linkage editor ???

if the SCLM build was successful
( choose one )

1 ) the SCLM definition were wrong
2 ) the abend is not related to the NCAL stuff
3 ) You did not choose the proper archdef for Your objects

look at the linkage editor output and find the names of the unresolved VCONS
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 4223
Location: Atlanta, GA

PostPosted: Tue Jun 30, 2009 4:52 pm    Post subject:
Reply with quote

Quote:
I understood why NCAL cannot be executed by JCL directly.
But for the following ARCHDEF, I want to build a LMOD called LJ84STRU from two NCAL,
one main (LJ84STR1), can one sub (STRUCT).
No, no, no, no, no, no. NCAL is a linkage editor (binder) option. It is only an option. It is not a program, it is not a facility, it is merely an option.

NCAL cannot be executed by JCL directly because it is not a program. You execute the binder and specify NCAL as an option to the binder, if you need the option.

You do not have "two NCAL" as you said.
You have two programs, one main and one sub. If you want, you can link them with NCAL or you can link them without NCAL. But it is not correct to call them NCAL because the term does not fit -- you are not referring to linkage editor options when you are referring to your two programs.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 268
Location: China

PostPosted: Wed Jul 01, 2009 7:41 am    Post subject: Re: Reply to: When should NCAL be used in SCLM?
Reply with quote

enrico-sorichetti wrote:
what kind of abend ???
what is the return code of the linkage editor ???

if the SCLM build was successful
( choose one )

1 ) the SCLM definition were wrong
2 ) the abend is not related to the NCAL stuff
3 ) You did not choose the proper archdef for Your objects

look at the linkage editor output and find the names of the unresolved VCONS


I'm sorry ,but can you tell me what 'VCONS' is?
I put all my archdef and archNCL as follows ,

the ARCHDEF which generate LMOD is:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
********************************* データの始め *************************
LKED     LINKE                        * LINKAGE                      * 
LOAD     LJ84STRU  LMOD                * LOAD MODULE                  *
INCL     LJ84STR1  ARCHNCL             * PLI SOURCE                   *
INCL     STRUCT    ARCHNCL             * PLI SOURCE                   *
CMD      INCLUDE   SYSLIB(DSNELI)                                       
CMD      INCLUDE   SYSLIB(CSQBSTUB)                                     
********************************* データの終り *************************


in the above ARCHDEF, ARCHNCL of LJ84STR1 (main program) is defined as:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** データの始め *****************************
*---------------------------------------------------------------------*
* MEMBER NAME      : LJ84STR                                          *
* DEFINITION TYPE  : LEC ARCHITECTURE DEFINITION                      *
* DESCRIPTION      : DEFINE BATCH EXECUTABLE LOAD MODULE              *
*  (NO DLI CALL)                                                      *
*---------------------------------------------------------------------*
LKED     LINKNE                        * LINKAGE                      *
LOAD     LJ84STR1  NCAL                * NCAL                         *
INCLD    LJ84STR1  PLI                 * PLI SOURCE                  * 
**************************** データの終り   ****************************


ARCHNCL of STRUCT (sub program) is defined as:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* データの始め *********************************
*---------------------------------------------------------------------*         
* MEMBER NAME      : STRUCT                                           *         
* DEFINITION TYPE  : LEC ARCHITECTURE DEFINITION                      *         
* DESCRIPTION      : DEFINE BATCH EXECUTABLE LOAD MODULE              *         
*  (NO DLI CALL)                                                      *         
*---------------------------------------------------------------------*         
LKED     DB2LNKE                       * LINKAGE                      *         
LOAD     STRUCT    NCAL                * LOAD MODULE                  *         
INCLD    STRUCT    PLI                 * PLI SOURCE                   *         
CMD      INCLUDE   SYSLIB(DSNELI)                                               



I compile the above ARCHDEF with SCLM, REC=0, but when I run the LMOD, the following abend message came out:
Code:

1JOB EV6954RV         STEP CRE01           TIME 235733   DATE 09172    ID = 000    CPUID = 000D33502094   PAGE 00000001
0COMPLETION CODE      SYSTEM = 0C4      REASON CODE = 00000004

   PSW AT ENTRY TO ABEND   078D0000  00007658  ILC  06  INTC  0004
0PSW LOAD MODULE             ADDRESS = 00007640  OFFSET = 00000018
 NAME=LJ84STRU

  ASCB: 00FA2780
           +0000  ASCB..... ASCB      FWDP..... 00F91E00  BWDP..... 00FB5600  LTCS..... 00000000  SVRB..... 00AFDAA0
           +0014  SYNC..... 0252D283  IOSP..... 00000000  R01C..... 0000      WQID..... 0000      SAWQ..... 00000000
           +0024  ASID..... 007D      R026..... 00        SRMF..... 00        LL5...... 00        HLHI..... 01
           +002A  DPH...... 00EE      TCBE..... 00000000  LDA...... 7FF19E10  RSMF..... 00        FLG3..... 00
           +0036  HASI..... 007D      CSCB..... 00D96300  TSB...... 00000000  EJST..... 00000000  005EC7E0




On the other hand , if I change the definition of ARCHDEF to below, and compile the ARCHDEF, REC=0 for compile, and the LMOD generated goes well when I run with JCL.
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** データの始め *****************************
LKED     LINKE                        * LINKAGE                      * 
LOAD     LJ84STRU  LMOD                * LOAD MODULE                  *
INCLD    LJ84STR1  PLI                    * PLI SOURCE                                     
INCL     STRUCT    ARCHNCL             * PLI SOURCE                   *
CMD      INCLUDE   SYSLIB(DSNELI)                                       
CMD      INCLUDE   SYSLIB(CSQBSTUB)                                     
**************************** データの終り   ****************************



Obviously, the reason for the abend is due to the ARCHNCL of LJ84STR1 (main program).

so, I wonder if main program and sub program cannot be compiled with option NCAL at the same time?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 268
Location: China

PostPosted: Wed Jul 01, 2009 7:44 am    Post subject:
Reply with quote

Robert Sample wrote:
Quote:
I understood why NCAL cannot be executed by JCL directly.
But for the following ARCHDEF, I want to build a LMOD called LJ84STRU from two NCAL,
one main (LJ84STR1), can one sub (STRUCT).
No, no, no, no, no, no. NCAL is a linkage editor (binder) option. It is only an option. It is not a program, it is not a facility, it is merely an option.

NCAL cannot be executed by JCL directly because it is not a program. You execute the binder and specify NCAL as an option to the binder, if you need the option.

You do not have "two NCAL" as you said.
You have two programs, one main and one sub. If you want, you can link them with NCAL or you can link them without NCAL. But it is not correct to call them NCAL because the term does not fit -- you are not referring to linkage editor options when you are referring to your two programs.


I searched out manuals for SCLM and PL/1 for NCAL, but I still cannot find any specification for this compile option, neither can Google.

So, please tell me where I can find the specification for NCAL?

Thanks.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 13556
Location: 221 B Baker St

PostPosted: Wed Jul 01, 2009 8:48 am    Post subject:
Reply with quote

Hello,

NCAL is a link edit option. . .

Quote:
No Call - Automatic calls to SYSLIB DDname libraries will not be made to resolve external references. The LIBRARY statement also cannot be used. The program load module is marked as executable, however.
Quote:
NCAL is a Linkage Editor Option so that called modules (like the COBOL support routines) will not be linked into the sub modules when they are first linked. These sub modules are linked into a PDS. This PDS that the sub modules are linked into should be allocated to the DD SYSlib in the link step when the main program is linked. When linking the main program do not use NCAL. The sub modules and all of the COBOL support routines will be linked in at this time.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 268
Location: China

PostPosted: Wed Jul 01, 2009 10:19 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

NCAL is a link edit option. . .

Quote:
No Call - Automatic calls to SYSLIB DDname libraries will not be made to resolve external references. The LIBRARY statement also cannot be used. The program load module is marked as executable, however.
Quote:
NCAL is a Linkage Editor Option so that called modules (like the COBOL support routines) will not be linked into the sub modules when they are first linked. These sub modules are linked into a PDS. This PDS that the sub modules are linked into should be allocated to the DD SYSlib in the link step when the main program is linked. When linking the main program do not use NCAL. The sub modules and all of the COBOL support routines will be linked in at this time.

Thanks for your reply.
Can you tell me where I can download the book which contains the above quoted statements?

I trust you from my bottom of my heart, but I lack resources like this.
So,I want to get more resources.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 268
Location: China

PostPosted: Wed Jul 01, 2009 10:58 am    Post subject:
Reply with quote

As I mentioned above, I still do not understand why the following ARCHDEF can be compiled smoothly since I specified ARCHNCL, which compiles with option NCAL.
Code:


----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
********************************* データの始め *************************
LKED     LINKE                        * LINKAGE                      * 
LOAD     LJ84STRU  LMOD                * LOAD MODULE                  *
INCL     LJ84STR1  ARCHNCL             * PLI SOURCE                   *
INCL     STRUCT    ARCHNCL             * PLI SOURCE                   *
CMD      INCLUDE   SYSLIB(DSNELI)                                       
CMD      INCLUDE   SYSLIB(CSQBSTUB)                                     
********************************* データの終り *************************
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 4223
Location: Atlanta, GA

PostPosted: Wed Jul 01, 2009 3:11 pm    Post subject:
Reply with quote

VCONS is a shortcut for saying v-type address constants in assembler. An address that is not part of the current assembler code is a VCONS, while addresses that are part of the current assembler code are ACONS. The names come from the assembler statements for each:
Code:
DS    V(extprog)
DS    A(intaddr)


If you go to IBM's web site, find the MVS bookshelf for your version of z/OS, and bring up the Program Management User's Guide you will find everything about NCAL and the other linkage editor (binder) options.

You need to consult with your site support group for your SCLM. They are the ones that set up your environment, so they are the ones that can easiest and most completely answer your questions about why things are working the way that they do.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 268
Location: China

PostPosted: Thu Jul 02, 2009 8:50 pm    Post subject:
Reply with quote

Robert Sample wrote:

If you go to IBM's web site, find the MVS bookshelf for your version of z/OS, and bring up the Program Management User's Guide you will find everything about NCAL and the other linkage editor (binder) options.


I got it. Thank you very much!

why NCAL ?

Quote:

Link-editing PL/I Subroutines for Later Use

z/OS V1R9.0 Language Environment Programming Guide
SA22-7561-08


To prelink PL/I subroutines, store them in a load library, and later INCLUDE them with main procedures. The subroutines must be linked with the NCAL link-edit option which causes unresolved external reference error messages from the link-edit process, but these are resolved when the PL/I main procedure is linked with the subroutines. The NCAL option is needed because, in a PL/I load module, all the resident modules must be at the same level. This consistency is ensured because external references are not resolved until the final link.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 4223
Location: Atlanta, GA

PostPosted: Thu Jul 02, 2009 8:51 pm    Post subject:
Reply with quote

Glad to hear it helped!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1