mainframe - initialize an index variable in cobol -


we have cobol program in populate values cobol internal table , search table find out value. prior search, initialize tables index variable.

set paf-idx                  1.    

could clarify, if allowed in cobol initialize index variable loke this.

initialize                   paf-idx. 

no. , why want "initialize" it?

this ibm enterprise cobol manual:

identifier-1 receiving areas. identifier-1 must reference 1 of following: v alphanumeric group item v national group item v elementary data item of 1 of following categories: alphabetic alphanumeric alphanumeric-edited dbcs external floating-point internal floating-point national national-edited numeric numeric-edited v special register valid receiving operand in move statement identifer-2 or literal-1 sending operand. when identifier-1 re 

edit:

the opencobol programmer's guide documents specifically:

the list of data items eligible set new values statement is: every elementary item specified identifier-1 ..., plus... every elementary item defined subordinate every group item specified dentifier-1  ..., following exceptions: usage index items excluded. items redefines part of definition excluded; means tems subordinate them excluded well.  

the draft cobol standard less explicit, these items when used in initialize processed generating set rather move: data-pointer, function-pointer, object-reference, or program-pointer.

edit:

seeing opencobol reference not "specific" thought: in ibm cobol, currently, nothing cannot manipulated being target of move can initialized. same current opencobol. draft cobol has exceptions, listed, including neither indexed (which not part of table itself, separate items compiler defines storage) nor usage index.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -