|  |     
    Not directly, but if these are stored sequentially with respect to
    week (i.e. first rec = week 1 rec), then you can do it via a DEFINE. 
    
    B-T-W, you do mean 52 weeks not 54, n'est-ce pas??? 
    
    
    DEFINE FILE yourfile 
    
       REC_CNT/I2 = IF LAST REC_CNT EQ 52 THEN 1 
                    ELSE LAST REC_CNT + 1; 
    
       M_GROSS_REQ_Q1/I6 = IF (REC_CNT GE 1) AND (REC_CNT LE 13) 
                           THEN M_GROSS_REQ 
                           ELSE 0;
    
       M_GROSS_REQ_Q2/I6 = IF (REC_CNT GE 14) AND (REC_CNT LE 26) 
                           THEN M_GROSS_REQ 
                           ELSE 0;
     
    
      etc., etc.
    
    
    
    END 
    
    TABLE FILE yourfile  
      SUM M_GROSS_REQ_Q1 ... 
    
    ON TABLE HOLD 
    END
    
    
    TABLE FILE HOLD
    
     SUM ...
    
     BY ...
     BY ...
    
    etc., etc. 
    
    
    
    
    
    
    
    
    
    hope this is useful
 | 
|  | Paul,
Along the same idea, you can use one of the OCCURS segment feature :
	There can be a special field (called ORDER field) that must be
	placed at the end of the segment, and that will be incremented
	for each record in the occurs segment. The field must have an
	ALIAS or "ORDER" and an ACTUAL format of I4
which gives :
  SEGNAME=MRP_NUM,SEGTYPE=S0,PARENT=ROOT, OCCURS=54,$
  FIELD=M_GROSS_REQ        ,ALIAS=M_GROSS_REQ  ,USAGE=I6        ,ACTUAL=I4   ,$
  FIELD=M_OPEN_ORDER       ,ALIAS=M_OPEN_ORDER ,USAGE=P6        ,ACTUAL=I4   ,$
  FIELD=M_ON_HAND          ,ALIAS=M_ON_HAND    ,USAGE=P6        ,ACTUAL=I4   ,$
  FIELD=M_REC_ORDER        ,ALIAS=M_REC_ORDER  ,USAGE=P6        ,ACTUAL=I4   ,$
  FIELD=M_REC_RESCH        ,ALIAS=M_REC_RESCH  ,USAGE=P6        ,ACTUAL=I4   ,$
  FIELD=M_AVAIL_RES        ,ALIAS=M_AVAIL_RES  ,USAGE=P6        ,ACTUAL=I4   ,$
  FIELD=M_WEEK_CNT         ,ALIAS=ORDER        ,USAGE=I2        ,ACTUAL=I4   ,$
Then you can either do :
	SUM M_ON_HAND
	IF M_WEEK_CNT IS_FROM 1 TO 16
or use define field computed depending on M_WEEK_CNT, if you want all your
sums to be computed on the same pass.
Jean-Claude
 |