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
 

 

Strange issue in PL1 program (EPL1)
Goto page 1, 2  Next
 
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: Wed Nov 04, 2009 2:35 am    Post subject: Strange issue in PL1 program (EPL1)
Reply with quote

Hi,

I have come across a strange issue in one of our production PL1 programs. One of the variables is being returned as zero from the production code. However if I put any diagonostic (PUT LIST) in the code, this variable gets populated accurately.
Am totally confused by this as I have never encountered any such issue before. have tested this many times with and without any diags but have faced this everytime with this program.
Does anyone have any idea of such issues or have encountered any similar things before ? any clue or pointer may help us to find the RC of this.
Thanks in advance.
Back to top
View user's profile Send private message

prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Wed Nov 04, 2009 3:47 am    Post subject:
Reply with quote

Is the compiler fully up to date with all the latest PTF's? Did you check all compiler messages? What are the compiler options? What is thetype of the variable?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Wed Nov 04, 2009 4:11 am    Post subject:
Reply with quote

Batch or online? How is the variable defined? Where is it returned from? Is the variable part of a structure?
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Nov 04, 2009 2:00 pm    Post subject:
Reply with quote

Thanks for the prompt reply.

The variable is defined as:

DCL END_DATE_VALUES(10,3) FLOAT BIN(53)
BASED (END_DATE_VALUES_PTR);

and is getting populated from a structure variable which is defined as
DCL 1 RESULTS,
3 PROJECTED (10),
5 SV_DEDN_MID FIXED DEC(13,2)

I think the compiler is fully up-to date and by options do you means this. I have copied it from the compile listing:

IBM(R) Enterprise PL/I for z/OS
AGGREGATE(HEXADEC)
ARCH(7)
ATTRIBUTES(SHORT)
BACKREG(5)
BIFPREC(31)
BLANK('05'x)
BLKOFF
CEESTART(FIRST)
CHECK( NOCONFORMANCE NOSTORAGE )
CMPAT(V2)
CODEPAGE(00285)
NOCOMMON
NOCOMPACT
NOCOMPILE(E)
COPYRIGHT
CSECT
CSECTCUT(4)
CURRENCY('£')
NODBCS
DD('SYSPRINT','SYSIN','SYSLIB','SYSPUNCH','SYSLIN','SYSADATA','SYSXMLSD
DECIMAL( FOFLONASGN NOFORCEDSIGN )
DEFAULT(IBM ASSIGNABLE NOINITFILL CONNECTED UPPERINC
DESCRIPTOR DESCLOCATOR DUMMY(ALIGNED) ORDINAL(MIN)
BYADDR RETURNS(BYADDR) LINKAGE(SYSTEM) NORETCODE
NOINLINE REORDER NOOVERLAP NONRECURSIVE ALIGNED
NULL370 BIN1ARG EVENDEC SHORT(HEXADEC)
EBCDIC HEXADEC NATIVE NATIVEADDR E(HEXADEC))
DISPLAY( WTO )
NODLLINIT
EXIT('' 'IBMUEXIT')
EXTRN(SHORT)
FLAG(I)
FLOAT( NOAFP NODFP )
FLOATINMATH(ASIS)
GONUMBER
NOGRAPHIC
INCAFTER(PROCESS(""))
NOINCDIR
NOINCPDS
NOINITAUTO
NOINITBASED
NOINITCTL
NOINITSTATIC
NOINSOURCE
NOINTERRUPT
LANGLVL(SAA2 OS)
LIMITS( EXTNAME(7) FIXEDBIN(31,63) FIXEDDEC(15,31) NAME(100) )
LINECOUNT(59)
NOLINEDIR
NOLINEDIR
NOLIST
MACRO
MAP
MARGINI(' ')
MARGINS(2,72,1)
H31 IBM(R) Enterprise PL/I for z/OS /* Do HBP and HBN policy proje
MAXMEM(2097152)
MAXMSG(E 250)
MAXNEST( BLOCK(5) DO(5) IF(5) )
MAXSTMT(4096)
MAXTEMP(200000)
NOMDECK
NONAME
NAMES('@#£' '@#£')
NATLANG(ENU)
NEST
NOT('¬')
NUMBER
OBJECT
OFFSET
OPTIMIZE(3)
OPTIONS(ALL)
OR('|')
PP( MACRO )
NOPPCICS
NOPPMACRO
NOPPINCLUDE
NOPPSQL
NOPPTRACE
PRECTYPE(ANS)
PREFIX(CONVERSION FIXEDOVERFLOW INVALIDOP OVERFLOW
NOSIZE NOSTRINGRANGE NOSTRINGSIZE NOSUBSCRIPTRANGE
UNDERFLOW ZERODIVIDE)
NOPROCEED(S)
PROCESS(DELETE)
QUOTE('"')
REDUCE
NORENT
RESEXP
RESPECT()
RULES(IBM BYNAME NODECSIZE NOEVENDEC ELSEIF GOTO NOLAXBIF NOLAXCTL
NOLAXDCL NOLAXDEF NOLAXIF NOLAXINOUT NOLAXLINK LAXMARGINS
NOLAXPUNC LAXQUAL NOLAXSEMI NOLAXSTG NOLAXSTRZ NOMULTICLOSE NOUNR
SCHEDULER
NOSEMANTIC(S)
SERVICE('R0042 **EYECATCHER**(PRVDEV) ')
SOURCE
SPILL(512)
STATIC(SHORT)
NOSTDSYS
NOSTMT
STORAGE
STRINGOFGRAPHIC(GRAPHIC)
NOSYNTAX(S)
SYSPARM('')
SYSTEM(MVS)
NOTERMINAL
NOTEST
TUNE(7)
USAGE( ROUND(IBM) UNSPEC(IBM) )
WIDECHAR(BIGENDIAN)
WINDOW(1950)
H31 IBM(R) Enterprise PL/I for z/OS
NOWRITABLE(FWS)
XINFO(NODEF NOMSG NOSYM NOSYN NOXMI NOXML)
XML( CASE(UPPER) )
XREF(SHORT)
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Nov 04, 2009 2:22 pm    Post subject:
Reply with quote

This is a batch program.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Nov 04, 2009 6:55 pm    Post subject: Reply to: Strange issue in PL1 program (EPL1)
Reply with quote

any reason to have/redefine the date as a FLOAT ???
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Nov 04, 2009 7:44 pm    Post subject:
Reply with quote

It doesn't hold a date. It holds a projection amount.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Wed Nov 04, 2009 7:48 pm    Post subject:
Reply with quote

Use the LIST option to get the pseudo-assembler output for the compile. Compare the compile output with the PUT LIST and the compile output without the PUT LIST to see the differences -- that may get you started in figuring out the problem.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Nov 04, 2009 7:50 pm    Post subject: Reply to: Strange issue in PL1 program (EPL1)
Reply with quote

from where do You load the pointer ???
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Nov 04, 2009 8:24 pm    Post subject:
Reply with quote

The pointer gets loaded from another module. Having debugged this further we have found that the pointer is getting loaded correctly when run with an PUT SKIP LIST but not when run without diagonostics
Can this mean that it could be a storage issue somewhere ?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Nov 04, 2009 8:27 pm    Post subject: Reply to: Strange issue in PL1 program (EPL1)
Reply with quote

Quote:
... Having debugged this further we have found that the pointer is not getting loaded correctly ...


nuff said... go ahead and fix it icon_biggrin.gif
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Nov 04, 2009 8:28 pm    Post subject:
Reply with quote

Yeah it seems to be a coding error somewhere, but I am still a bit confused as to how a PUT LIST can affect the variable values.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Wed Nov 04, 2009 8:40 pm    Post subject:
Reply with quote

Some years back at a previous shop, we had a CICS program that would not run correctly. If we used CEDF or Xpediter to debug it, the error went away. Eventually we discovered that there was a terminal handling error that was not caught correctly -- when we used the debugger, the debugger changed the screen sequence so it was different, hence the problem went away.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Wed Nov 04, 2009 11:08 pm    Post subject:
Reply with quote

Finally I have debugged the problem. The below structure was passed from module A to module B using ADDR(QUOTE_INDS)

DCL 1 QUOTE_INDS ,
3 SV_REQD BIT(1),
3 LV_REQD BIT(1),
3 MV_REQD BIT(1),
3 DC_REQD BIT(1),
3 PU_REQD BIT(1),
3 MP_REQD BIT(1),
;

In program B it was being retrived as

DCL 1 QUOTE_INDS BASED (QUOTE_INDS_PTR),
3 SV_REQD BIT(1),
3 LV_REQD BIT(1),
3 MV_REQD BIT(1),
3 DC_REQD BIT(1),
3 PU_REQD BIT(1),
3 MP_REQD BIT(1),
3 CI_REQD BIT(1)
;

So module B had one extra BIT variable defined to the structure - CI_REQD .

For the first call to B, this value was set to 0, however for all later calls it was set to 1. If any 'PUT LIST' was included in the calling program A, this value was always set as 0 in program B. I couldn't find an explanation to this mystery yet as to how the PUT LIST was affecting the default value.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Nov 05, 2009 3:20 am    Post subject:
Reply with quote

Is the production module MVS PL/I, being re-compiled for testing wth the Enterprise PL/I compiler?
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Thu Nov 05, 2009 5:59 am    Post subject:
Reply with quote

Well it is the production MVSPLI code changed to EPL1 recently.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Thu Nov 05, 2009 5:27 pm    Post subject: Reply to: Strange issue in PL1 program (EPL1)
Reply with quote

Strangely this was working fine in acceptance test even with EPL1 compiler.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Nov 05, 2009 7:36 pm    Post subject:
Reply with quote

We noted in our shop a difference in the way that MVS and Enterprise handle "slack" bits in structures; MVS ignores them, whereas Enterprise sets them to '0'B. This does not sound as if it is your problem, though.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Thu Nov 05, 2009 8:41 pm    Post subject: Reply to: Strange issue in PL1 program (EPL1)
Reply with quote

Thanks for that info.

In my case the variable was having a value of '1'B.
But the bigger question is, how was a PUT SLIST affecting the variable value.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Nov 05, 2009 10:23 pm    Post subject: Reply to: Strange issue in PL1 program (EPL1)
Reply with quote

a PUT will certainly change the optimization logic !
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
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 Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm


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