In a COBOL program one variable is defined as S9(18 ) COMP-3. Ineed to write it in a SAS dataset. In SAS, it is defined as EMP_ID PD10. Now, I want to verify the data in the SAS dataset. The sas field is written to output file but the output does not come correctly if the field has 18 digits or more. For example, if the i/p value is 225346343636363636(18 digits) the o/p is 225346343636363632. But if the input is of 17 digits it shows correctly.
SAS code is:
Code: Select all
DATA _NULL_;
SET OUTFILE(KEEP=EMP_ID);
FILE OUTFIL2;
PUT @1 EMP_ID 20.;
RUN;