Meaning of (R1./11) statement ?

Software AG's platform-independent programming language with full support for open-source and Internet applications
diptisaini
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Skillset: Natural,Adabas,jcl
Referer: friend

Meaning of (R1./11) statement ?

Postby diptisaini » Mon May 31, 2010 6:55 pm

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 ?

User avatar
RGZbrog
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
Referer: SAG Developer Forum
Location: California, USA
Contact:

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

Postby RGZbrog » Mon May 31, 2010 8:31 pm

"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:

Code: Select all

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.


  • Similar Topics
    Replies
    Views
    Last post