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

Strange issue in PL1 program (EPL1)


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: Wed Nov 04, 2009 2:35 am
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Nov 04, 2009 3:47 am
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 04, 2009 4:11 am
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
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
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 04, 2009 6:55 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 04, 2009 7:48 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 04, 2009 7:50 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 04, 2009 8:27 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 04, 2009 8:40 pm
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
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: 1788
Location: Bloomington, IL

PostPosted: Thu Nov 05, 2009 3:20 am
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
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
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: 1788
Location: Bloomington, IL

PostPosted: Thu Nov 05, 2009 7:36 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 05, 2009 10:23 pm
Reply with quote

a PUT will certainly change the optimization logic !
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Fri Nov 06, 2009 3:45 pm
Reply with quote

That sounds good.

Thanks a lot Enrico.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


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

PostPosted: Wed Nov 18, 2009 7:17 pm
Reply with quote

I'm a bit late to the party, but DO realise that, by adding a PUT LIST (or any) instruction, the storage occupancy is altered. The QUOTE_INDS variable will most likely be in a different location after the additional instruction(s) are added, so you are not really comparing like with like.

Garry.
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 Using API Gateway from CICS program CICS 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top