Page 1 of 1

Meaning of (R1./11) statement ?

PostPosted: Mon May 31, 2010 6:55 pm
by diptisaini
IF UNIT-CONTROL(R1.) = HOLDING-POS-UNITS-HELD(R1./11)
MOVE UNIT-CONTROL(R1.) TO #CW0002L1-IN-DEPOSIT
MOVE 0 TO #CW0002L1-AT-VAULT
ELSE
MOVE HOLDING-POS-UNITS-HELD(11) TO #CW0002L1-IN-DEPOSIT
MOVE UNIT-CONTROL(R1.) TO #CW0002L1-AT-VAULT
COMPUTE #CW0002L1-AT-VAULT = #CW0002L1-AT-VAULT -
#CW0002L1-IN-DEPOSIT
END-IF

I just need to know what is the meaning of IF UNIT-CONTROL(R1.) = HOLDING-POS-UNITS-HELD(R1./11) statement ?

Re: Meaning of (R1./11) statement ?

PostPosted: Mon May 31, 2010 8:31 pm
by RGZbrog
"R1." is a statement label, likely referring to a READ statement. Statement labels are used as field qualifiers. For example, if your master and transaction files both contained a PERSONNEL-ID field, Natural wold need to know which one you meant. In "R1./11" the slash is used to separate the label from the index.

You could also qualify using the view name:
view.UNIT-CONTROL = view.HOLDING-POS-UNITS-HELD(11)

This statement assigns UNIT-CONTROL to the value of the 11th occurrence of HOLDING-POS-UNITS-HELD.