Home SELCOPY CBLVCAT CBLi Trial/Prices CBL SiteMap
 
Multiple Information Retrieval, Manipulation & Update for IBM Mainframe, iSeries, UNIX & PC Platforms

SELCOPY Examples Menu

Almost as simple are SELCOPY's selection and modification capablities. For example:

 RD INFILE                    * Read a record
 IF POS 10 = 'CR'             * Select records with CR in col 10
   THEN PRINT STOPAFT=10      * and print only the first 10
   THEN WRITE CRFILE          * and write all of them to CRFILE
 IF POS ANY   = 'PICK ME'     * Scan whole rec for PICK ME
   THEN POS @ = 'PICKED '     * change it to PICKED
   THEN WRITE PKFILE          * and create a file of picked
   ELSE WRITE NOTPK           * plus file of not picked
        

Selection criteria can be as simple or as complex as required. The above example illustrates use of IF/THEN/ELSE logic, but further conditions can be stipulated based on the result of a previous one with the use of THENIF/ELSEIF. Nesting can therefore easily be achieved in a structured and understandable manner.

Top © 2005 Compute (Bridgend) Limited
http://www.cbl.com/selcex02.html
yyyy/mm/dd HH:MM:SS