func Begin(){ trcount = 0; lncount = 1; line = 4120; trace1 = 1320; trace = trace1; trdist1 = 300; trdist = trdist1; trdistinc = 300; } func OnLineHeader(){ LH.NumTrc = 50; LH.NumRec = 29161; output(LH); } func OnTrace(){ /* this section basically adds indexing to a dds cube dataset that is currently sorted in CRP. In this example there are 241 CRP records to a line and 50 offsets to each CRP. */ trcount++; trdist = trdist + trdistinc; if ( (trcount-1)%50 == 0 ) { trcount = 1; lncount++; trace++; trdist = trdist1; } Tr.DstSgn = trdist; Tr.LinInd = line; Tr.CDPBCX = line; Tr.DphInd = trace; Tr.CDPBCY = trace; Tr.RecNum = lncount; Tr.TrcNum = trcount; output(Tr); if ( lncount == 241){ lncount = 1; line = line + 2; trace = trace1; } } func End(){ print(" Done\n"); }