Please help by clarifying what is meant with "...anywhere after the length statement it doesn't work."
If you want the _N_ value of the first input file (+100), then the suggested assignment statement will work, as explained. However, if you are only counting the intermediate file's "output observations", then you will need to increment a count variable "_OUTOBS_+1" or something within a DO/END code paragraph, before your OUTPUT, and add add +100 to that variable to create your "N" value.
Scott Barry
SBBWorks, Inc.