| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ProcessClass > ProcessClass Methods >====== Init (initialize the ProcessClass object) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[processclass functional organization expected use.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[kill shut down the processclass object .htm|{{btn_next_n.gif|Next page}}]] | | || | | **Init( **//view, relationmanager //[//, progress txt//] [, //progress pct//] | | [, //total records //] | **)** | | | | |//, stepclass//, //free element// | | {{blk2blue.jpg|blk2blue.jpg}} | **Init** | Initializes the ProcessClass object. | | //view// | The label of the VIEW to process. | | //relationmanager// | The label of the //view//'s primary file RelationManager object. | | //progress txt// | A numeric constant, variable, EQUATE, or expression that contains the control number of a text-based Window control. The ProcessClass uses this control to provide textual feedback to the end user. If omitted, //progress txt //defaults to zero (0) and the ProcessClass provides no textual feedback. | | //progress pct// | The label of a BYTE variable whose contents indicates what percent of the process is completed. The ProcessClass periodically updates //progress pct //so it can be the USE variable for a PROGRESS control. If omitted, the ProcessClass provides no numeric feedback. | | //total records// | A numeric constant, variable, EQUATE, or expression that contains the estimated number of records to process. The ProcessClass uses this value to calculate how much of the process is completed. You should use this parameter when you can easily estimate the number of records to be processed, that is, when the process is not dynamically filtered. If omitted, //totalrecords// defaults to zero. | | //stepclass// | The label of a StepClass object to monitor the progress of the process. The ProcessClass uses this object to determine how much of the process is completed. You should use this parameter when you cannot easily estimate the number of records to be processed, that is, when the process is dynamically filtered. | | //free element// | The label of the //view//'s free element field. The //stepclass //uses this field to determine how much of the process is completed. See //StepClass Methods--GetPercentile// for more information. | The **Init **method initializes the ProcessClass object. If you supply //total records //to process, the ProcessClass object calculates the progress of the process as a function of //total records //and the number of records processed so far. Otherwise, the ProcessClass object relies on the //stepclass //to calculate the progress of the process. See //StepClass Methods--GetPercentile// for more information. **Member of: [[processclass methods.htm|ProcessClass]]** **Implementation:** The Init method assigns //progress txt //to the PText property, reference assigns //progress pct //to the Percentile property, and assigns //total records //to the RecordsToProcess property. The Init method calls the ViewManager Init method. **Example:** ** !initialize the ProcessClass object** ** Process.Init( Process:View, |      !set the VIEW** **              Relate:Client, |      !set the primary file RelationManager** **                ?PctText,    |      !set the Window control for text messages** **                PctDone,     |      !set the PROGRESS USE variable** **               ProgressMgr,  |      !set StepClass object to monitor progress** **                 CLI:Name)          !set StepClass free element to monitor** **See Also:     **[[percentile portion of process completed .htm|Percentile]], [[ptext progress control number .htm|PText]], [[recordstoprocess number of elements to process .htm|RecordsToProcess]], [[init initialize the viewmanager object .htm|ViewManager.Init]]