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

Issue with the EPLI compiler


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Thu Feb 04, 2010 11:07 pm
Reply with quote

Hi,

I have come across the following issue with the EPLI compiler:

Existing code:
Code:
****
DCL 1 Q_VALS BASED (Q_VALS_PTR), 
3 ROW (0:119),               
  5 Q1        Float Bin(53), 
  5 Q2        Float Bin(53), 
  5 Q3        Float Bin(53)   ;

CALL CALC_JL2D ( Q_VALS1.Q1, 
                 Q_VALS2.Q1, 
                 Q_VALS.Q1 );

CALC_JL2D: PROC (QA,QB,PROB);                     
        DCL QA(*)                  FLOAT BIN(53);
        DCL QB(*)                  FLOAT BIN(53);
        DCL PROB(*)                FLOAT BIN(53);
  DO I....To ...;
    PROB(I)= ...;
  END;
END;
****
Code'd

With MVSPLI the value of Q_VALS changes after the Call to the proc but with EPLI the value of Q_VALS doesn't change .

The EPLI compile listing has the following OPTIONS:BYADDR RETURNS(BYADDR).

Can some one please explain why EPLI functions differently here and whether changing the compile options would make it behave like MVSPLI ?

Thanks.
Arnab
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Feb 08, 2010 7:38 pm
Reply with quote

Well, the first 2 variables you are passing aren't referenced in the code snippet shown. Q_VALS1 and Q_VALS2 are not shown - ?? and you don't show what the calculation is in the called procedure.

Garry.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Mon Feb 08, 2010 8:45 pm
Reply with quote

Hi,

In the main procedure:
Code:
DCL 1 Q_VALS1 LIKE Q_VALS;
DCL 1 Q_VALS2 LIKE Q_VALS;

In the called procedure:

Code:
DCL PROB_STILL_ALIVE(2)    FLOAT BIN(53);                 
DCL PROB_CLAIM_THIS_YR     FLOAT BIN(53);                 
DCL PROB_NO_CLAIM_BEFORE   FLOAT BIN(53);                 
DCL PROB_GIVEN_NO_CLAIM_BEFORE   FLOAT BIN(53);           
DCL PROB_BOTH_DIE_THIS_YR  FLOAT BIN(53);                 
DCL PROB_ONE_DIES_THIS_YR  FLOAT BIN(53);                 


DO I = LBOUND(QA,1) TO HBOUND(QA,1);     

PROB_BOTH_DIE_THIS_YR = QA(I) * QB(I) *             
                        PROB_STILL_ALIVE(1) *       
                        PROB_STILL_ALIVE(2);         
PROB_ONE_DIES_THIS_YR = QA(I) * PROB_STILL_ALIVE(1) * 
                        ( 1 - PROB_STILL_ALIVE(2) ) + 
                        QB(I) * PROB_STILL_ALIVE(2) * 
                        ( 1 - PROB_STILL_ALIVE(1) );   
PROB_CLAIM_THIS_YR = PROB_BOTH_DIE_THIS_YR +     
                     PROB_ONE_DIES_THIS_YR;       
 PROB_NO_CLAIM_BEFORE = PROB_STILL_ALIVE(1) +                 
                        PROB_STILL_ALIVE(2) -                 
                ( PROB_STILL_ALIVE(1) * PROB_STILL_ALIVE(2) );
 PROB_GIVEN_NO_CLAIM_BEFORE = PROB_CLAIM_THIS_YR /           
                              PROB_NO_CLAIM_BEFORE;           
 PROB(I) = ( PROB_GIVEN_NO_CLAIM_BEFORE *                     
             (PERCENTAGE_ADJ/100) ) +                         
             FLAT_ADDITION;                                   
 PROB(I) = MAX ( PROB(I),                                     
                 MIN_Q_VAL );                                 
PROB_STILL_ALIVE(1) = PROB_STILL_ALIVE(1) * (1-QA(I));       
PROB_STILL_ALIVE(2) = PROB_STILL_ALIVE(2) * (1-QB(I));       
END; 


Hope this helps.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Feb 09, 2010 2:57 pm
Reply with quote

Declaring a structure LIKE another structure only gives the names and attributes of the structure's variables. It does not assign values to those variables, so it's not possible to tell what values are being passed into the called procedure.

Since the Q_VALS1 and Q_VALS2 are uninitialised, it's not possible to tell what values are at those storage locations - particularly in the non-EPLI version.

Your variables in the called procedure don't seem to have initial values e.g.

Quote:
PROB_BOTH_DIE_THIS_YR = QA(I) * QB(I) *
PROB_STILL_ALIVE(1) *
PROB_STILL_ALIVE(2);


where the value of neither PROB_STILL_ALIVE element can be determined.

Garry.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Tue Feb 09, 2010 4:14 pm
Reply with quote

Thanks Gary for your reply.

Q_VALS1 and Q_VALS2 does get populated in the main para. I have not provided that bit of code as its a big program. Before the call to CALC_JL2D both Q_VALS1 and Q_VALS2 are getting populated and hold valid values.

And sorry I missed the initialization code of PROB_STILL_ALIVE .
It gets initialized to 1.0 as shown below before the DO loop:

PROB_STILL_ALIVE(*) = 1.0;

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

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Mon Feb 15, 2010 10:31 pm
Reply with quote

Any updates on this please ?

I've tried playing around the code, but still cannot understand how MVS and EPLI is differentiating this.

Has this something to do with the array definition and its interpretation in both the compilers ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Feb 15, 2010 10:55 pm
Reply with quote

Quote:
Any updates on this please ?


general consideration on forums...
usually when asking on a forum You get replies based on experience
( more or less close in time - both practical and/or theoretical )
quick and dirty one liner tests, samples availability
and You would get them in a very short time span,
... maybe for samples the time to find them in "SYS1.BASKETLIB" icon_biggrin.gif
chances to find somebody doing some long term research or experiments
are pretty thin!

anyway for an issue like Yours the best road would be to contact Your support and open an issue with IBM
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Tue Feb 16, 2010 7:08 pm
Reply with quote

I have found something different in both the compilers.
In EPLI compiler listing default is connected while in MVSPLI, default is nonconnected.
This may be causing an issue, will test and let you know if it works.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Tue Feb 16, 2010 8:24 pm
Reply with quote

It works fine with EPLI if I declare tha PROB(*) array as NONCONNECTED.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Feb 17, 2010 2:17 pm
Reply with quote

Though it words fine with EPLI now when I declare the variable as NONCONNECTED, it throws a compilation error for the same code with MVSPLI.

DCL PROB(*) FLOAT BIN(53) NONCONNECTED;

IEL0317I S 65 INVALID ATTRIBUTE SPECIFICATION AFTER 'OB(*) FLOAT BIN(53)' 'NONCONNECTED' IGNORED.

Does anyone has idea about this ? I have raised it with IBM but if anyone is already aware of this issue could you please let me know how to resolve it.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 17, 2010 2:42 pm
Reply with quote

speak to Your support installation group...
in older mvs the default is NONCONNECTED and You can specify CONNECTED as an attribute ( see the language reference manual )

Your support installation group did not care about the old defaults and having read only...
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IBM3MG60/4.2.3?SHELF=IBMSH360&DT=20071004122423

decided to use CONNECTED as default!

have them change the intallation defaults and You will have the source code compatibility as requested

topic should be closed as USER ERROR
even if the oversight was from the support group,still a user error
and even if an IBM SE under some form of contract had done the customization for You,
guess what... the issue would be closed as user error neverthless ! icon_biggrin.gif

nothing that Your organization could not find it self by looking at the manuals

start from
www-03.ibm.com/systems/z/os/zos/bkserv/index.html
proceed to
www-03.ibm.com/systems/z/os/zos/bkserv/zapplsbooks.html
and to
www-03.ibm.com/systems/z/os/zos/bkserv/zappls2.html
proceed to the pli bookshelf of Your choice ( for example)
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IBMSH360
and search the manuals text for CONNECTED
( or read the programming guide )

to find out about older releases
same as above but
www-03.ibm.com/systems/z/os/zos/bkserv/zappls3.html
and
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IBMSH306

have a good reading!
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Feb 17, 2010 4:22 pm
Reply with quote

Thanks Enrico.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Facing ABM3 issue! CICS 3
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
Search our Forums:

Back to Top