How can I read more than 2 billion records with VISION:Report?
search cancel

How can I read more than 2 billion records with VISION:Report?


Article ID: 31141


Updated On:




When reading more than 2 billion records, users experience u3336 abends due to overflow of the input file record counter.

The following code demonstrates a technique of using pointers to interrogate internal control blocksĀ to reset the internal counter for INF to work around this limitation.
In this example the counter is reset every 6 th record.

  (1)   OPTION IFNUM=YES                   Ok to compare unlike numeric fields 
  (2)        LIMITREADS 100                Limit sample size to 100 for example                                         
  (3)        SET PTA FUN1                  Set pointer A to first byte of function area                          
  (4)        SET PTA DOWN 948                                       
  (5)        SET PTA RESTORE PTA1-4-B      Point to QJOPTION control block                              
  (6)        SET PTA RESTORE PTA213-216-B  Point to INF control block                         
  (7)   100  GET INF ATEND EOJ                                      
  (8)        HEXEXPD PTA65-68 TO PRT1      Display current record count value                                           
  (9)        IF PTA65-68-B > P'5'          Tracking iteration of 5 records                              
  (10)           MOVE P'0' TO PTA65-68-B    Reset INF counter                           
  (11)        ENDIF                                                  
  (12)        MOVE INF1-100 TO PRT24                                 
  (13)        PRINT                                                  
  (14)        GOTO 100                                                      
00000001 07C8006547TORRES ERNESTO 00000002 07C6208657CHO PYUNG SUH 00000003 07C7082509ORTIZ DISRAELI 00000004 07C6002587HAASE ELLA L 00000005 07C6107265GENVARDI G J 00000006 07C6095631FODIPE MICHAEL 00000001 07C6123228SILVA JULIAN 00000002 07C6059708CHAVEZ RAY 00000003 07C6044395CANO MICHEAL S 00000004 07C6024963HILL GARY E 00000005 07C8011508HUGHES RAY 00000006 07C2002299PLACIDO ORTEGA 00000001 07C6123317VASGUEZ IRENE 00000002 07C6112536CHAVEZ NORMA A 00000003 07C6009166LOCKE JEFFREY ------------------------------------------------------------


Release: VSNREP00100-16.1-VISION:Report