*---------/mscdc/sas/formats/Tools/segtabl.sas----------*; x cd /mscdc/sas/formats/Tools; options mprint; %pgm(segtabl) options nomprint; /* This creates the segtabl format used by the update macro's processa link code in sas admatch on mvs and by the prepadd Specific instances of types, directions etc. are related to common codes for that entity which fall in a range related to the components category (eg. direction, type). JWS 2/13/98 RERUN 3/6/98 CHANGES TO AGREE WITH SEGOUT FORMAT: MAKE ROOM & SUITE, ROW & COVE AND EXPRESSWAY & FREEWAY UNIQUE; **CHANGE ABOVE FOR NEW FORMAT & ALL OCCURENCES OF NAME (UC LC)** */ libname library clear; libname library '/mscdc/sasctlgs'; filename text '/mscdc/sas/formats/Ssegtabl.sas'; libname geocodng '/uic/projects/geocoding'; data genfmtin;set geocodng.fmatcntl(where=(fmtname eq 'SEGTABL')); length hlo $3; if start in('RM','ROOM') and label='303' then label='302'; else if start in('FREEWAY','FRWY','FWY') and label='237' then label='242'; else if start='ROW' and label='240' then label='243'; else if start='SUITE' and label='303' then do; output; start='SUIT'; end=start; end; else if start='EXWY' and label='237' then do; output; start='EXPWY'; end=start; output; start='EXPWAY'; end=start; output; start='EXPRESSWAY'; end=start; end; if start='**OTHER**' then return; output; run; ***CHANGE ARGLEN AND LABELLEN***; %genfmat(setin=genfmtin,fmatname=segtabl,arglen=10,other='000', argvars=start,labelvar=label,labellen=3,savedoc=0); title2 'Partial Print of Format Source'; data _null_; infile text obs=50; input; file print; put _infile_; run; *---test the format---*; data _null_; set genfmtin(obs=10 keep=start label); length result $3; *<===change; result=put(start,$segtabl.); put start= label= result=; run; run;