Jump to page titleUNITED STATES
hp.com home products and services support and drivers solutions how to buy
» contact hp

:

more options
 

hp.com home
End of Jump to page title
[DEC PL/I] Initializing External Structures in Multiple File
Jump to content



» 

business support center

Home & Home Office Support:
» HP branded products
» Presario branded products
» Services & Warranties
Small & Medium Business Support:
» Small & Medium Business products
» Small & Medium Business services
Support for IT Professionals:
» Enterprise products (IT Resource Center)
» NonStop enterprise products
» Business & IT Services
Content starts here
Copyright (c) Digital Equipment Corporation 1996, 1998. All rights reserved.

PRODUCT:  DIGITAL DEC PL/I for OpenVMS Alpha, Version 4.1-1

OP/SYS:   DIGITAL OpenVMS Alpha, Version 6.2

SOURCE:   Digital Equipment Corporation


SYMPTOM:

With DIGITAL VAX PL/I, different fields of a static external structure
can be initialized in different source files.  With DEC PL/I for OpenVMS
Alpha this is no longer the case; only one of the initializations takes
place.


DIGITAL RESPONSE:

This problem has been reported to UniPrise[TM] Engineering.


WORKAROUND:

Place all of the initializations into one of the declarations.


ANALYSIS:

Create main.pli, init1.pli, and init2.pli (as shown below).  Compile,
link, and execute in the following order to reproduce the problem:

     $ TYPE main.pli
     main: procedure options(main);
         declare init1 external entry;
         declare init2 external entry;

         call init1;
         call init2;
     end main;
     $ TYPE init1.pli
     init1: procedure;
         declare 1 DBM$UWA_B static external,
             2 DBMUWA1 character(5) initial('init1'),
             2 DBMUWA2 character(5);

         put list('init1: DBMUWA1: ' || DBMUWA1) skip;
         put list('init1: DBMUWA2: ' || DBMUWA2) skip;
     end init1;
     $ TYPE init2.pli
     init2: procedure;
         declare 1 DBM$UWA_B static external,
             2 DBMUWA1 character(5),
             2 DBMUWA2 character(5) initial('init2');

         put list('init2: DBMUWA1: ' || DBMUWA1) skip;
         put list('init2: DBMUWA2: ' || DBMUWA2) skip;
     end init2;

     $ ! Example session
     $ !
     $ ! OpenVMS VAX V6.2, VAX PL/I V3.5-124 (both initializations are
     $ ! seen)
     $ !
     $ pli main
     $ pli init1
     $ pli init2
     $ LINK main,init1,init2
     $ RUN main

     init1: DBMUWA1: init1
     init1: DBMUWA2: init2
     init2: DBMUWA1: init1
     init2: DBMUWA2: init2
     $ LINK main,init2,init1
     $ RUN main

     init1: DBMUWA1: init1
     init1: DBMUWA2: init2
     init2: DBMUWA1: init1
     init2: DBMUWA2: init2
     $ !
     $ ! OpenVMS Alpha V6.2, DEC PL/I V4.1-1 (only see one of the
     $ ! initializations)
     $ !
     $ pli main
     $ pli init1
     $ pli init2
     $ LINK main,init1,init2
     $ RUN main

     init1: DBMUWA1:
     init1: DBMUWA2: init2
     init2: DBMUWA1:
     init2: DBMUWA2: init2
     $ LINK main,init2,init1
     $ RUN main

     init1: DBMUWA1: init1
     init1: DBMUWA2:
     init2: DBMUWA1: init1
     init2: DBMUWA2:


[TM]  UniPrise and the UniPrise logo are trademarks of UniPrise Systems
      Incorporated.

All other trademarks and registered trademarks are the property of
their respective owners.


buy online or call 1.800.AT.COMPAQ
privacy statementusing this site means you accept its terms