With this code, I write lines of 109 characters.
DATA _NULL_;
SET TP_FREQ_DATA;
FILE TPFREQ01;
OUT = MESSAGE_TYPE || ORIG_ADDR_ID || ORIG_SUB_ADDR_ID || EDI_VERSION || PUT(ERROR_DATA,$3.);
PUT OUT $CHAR109.;
RUN;
Next I read it back in, specifying positions further than the 109the character
DATA TEST;
INFILE TPFREQ01 LRECL=109 ;
INPUT
@1 RECTYPE $CHAR3. /* RECORD TYPE */
@04 ROAD $CHAR8. /* SENDING ROAD */
@116 VERSION $CHAR12. /* EDI VERSION */
@1947 ERRORS $CHAR3. /* ERROR 1 */
;
IF RECTYPE ^= '421' THEN DELETE;
IF ERRORS ^= ' ' THEN ERRORS = 'YES';
ELSE ERRORS = 'NO';
RUN;
Can anyone help with the value of VERSION and ERRORS because the lengths of one line is 109 but the pointers is at 116 and 1947.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…