79409321

Date: 2025-02-03 16:03:44
Score: 1
Natty:
Report link

Thanks to Tom, I now understand I should have specified the width of the first format when I nested it in the second format. In other words, I changed [longfmt.] to [longfmt52.]:

PROC FORMAT;
VALUE longfmt
    1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
VALUE nestfmt
    1 = [longfmt52.];
QUIT;

PROC SQL;
CREATE TABLE tbl (col NUM);
INSERT INTO tbl VALUES (1);

SELECT col FORMAT=longfmt. FROM tbl;
SELECT col FORMAT=nestfmt. FROM tbl;
QUIT;
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Nik