nik ganchev wrote:Hi All ,
I'm trying to understand a PLI program that has a strange (for me) Default statement :
DEFAULT( POINTER & ¬PARAMETER )INIT( (*) PTRVALUE('ABCDABCD'XN));
PL\I version is Enterprise V4.R2
According to the docs DEFAULT statement should be followed by RANGE or DESCRIPTORS keywords, but they are missing in my case.
I'm also puzzled by POINTER & ¬PARAMETER expression - what does it mean?
I see that it should initialize some pointer(s) with a given value , but which pointers ? Can you give me a clue where I could find more info ?
Thanks in advance,
Nik
This statement initializes
all POINTERs that are NOT PARAMETERs to the value X'ABCDABCD'...which has no significance save that it is a known value that can easily be spotted in a dump; in my shop we use an identical DEFAULT statement, save that the value used is X'DEAD2BAD'
![Smile :)](https://www.ibmmainframeforum.com/images/smilies/icon_e_smile.gif)
If we see that value, we know that the pointer has not been given a valid value (and thus may be the cause of a S0C1 or S0C4 abend).
The RANGE clause indicates the range of names to which the statement applies; the default range, so to speak, is "*" (all names) and so, since this statement is intended to apply to all pointers it need not be specified. DESCRIPTORS is only for attributes that are to be applied to parameters; since we are explicitly excluding parameters, it is useless.
Read more about the DEFAULT statement
here.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day