Hi! I have a table called vtmp. All the character type variable has a length of 1000 (see tab procContents in the attached excel). The actualLength tab has the desired length. Is there a way I can change the length using data step? The ideal way is that SAS code should calculate the max length of all character type field and reset that field length to the max. I am thinking of a pseudo code like this: data vtmp_new; length cap_batch_id 6 length claim_number 12 …. …. set vtmp; run; The above is when I have precalculated the lengths individually and provide the information. The ideal would be that SAS reads the table, calculates the max length, and sets it to that length. Data vtmp_new; Set vtmp; If cap_batch_id is char type then length cap_batch_id max(length(cap_batch_id)) … .. Run I am reading data from big data and all fields defaults to 36000 unless I set it to 1000.
... View more