Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Issue with the EPLI compiler

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Issue with the EPLI compiler
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

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Feb 08, 2010 7:38 pm    Post subject:
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    Post subject: Reply to: EPLI issue
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

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Feb 09, 2010 2:57 pm    Post subject:
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    Post subject: Reply to: EPLI issue
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    Post subject: Reply to: EPLI issue
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Feb 15, 2010 10:55 pm    Post subject: Reply to: EPLI issue
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    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Feb 17, 2010 2:42 pm    Post subject: Reply to: EPLI issue
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...
http://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
http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html
proceed to
http://www-03.ibm.com/systems/z/os/zos/bkserv/zapplsbooks.html
and to
http://www-03.ibm.com/systems/z/os/zos/bkserv/zappls2.html
proceed to the pli bookshelf of Your choice ( for example)
http://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
http://www-03.ibm.com/systems/z/os/zos/bkserv/zappls3.html
and
http://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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm
No new posts Problem Compiling cobol code with Cob... amitc23 COBOL Programming 2 Wed Aug 24, 2016 1:50 pm
No new posts COBOL compiler upgrade vicky10001 COBOL Programming 4 Mon Jul 25, 2016 1:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us