Skip to content

Commit

Permalink
Merge pull request #365 from sasjs/issue363
Browse files Browse the repository at this point in the history
Issue363
  • Loading branch information
allanbowe authored Nov 8, 2023
2 parents fccd6fc + 02bf9c8 commit f4a4263
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 28 deletions.
37 changes: 23 additions & 14 deletions all.sas
Original file line number Diff line number Diff line change
Expand Up @@ -10184,6 +10184,7 @@ select distinct lowcase(memname)
@li mp_aligndecimal.sas
@li mp_cntlout.sas
@li mp_lockanytable.sas
@li mp_md5.sas
@li mp_storediffs.sas

<h4> Related Macros </h4>
Expand Down Expand Up @@ -14176,16 +14177,34 @@ ods package close;
(given various practical restrictions) are described here to enable
consistency when dealing with format data.

The HLO variable may have a number of values, documented here due to the
256 char label description length limit:

F=Standard format/informat.
H=Range ending value is HIGH.
I=Numeric informat.
J=Justification for an informat.
L=Range starting value is LOW.
M=MultiLabel.
N=Format or informat has no ranges, including no OTHER= range.
O=Range is OTHER.
R=ROUND option is in effect.
S=Specifies that NOTSORTED is in effect.
U=Specifies that the UPCASE option for an informat be used.


**/


%macro mddl_sas_cntlout(libds=WORK.CNTLOUT);

proc sql;
create table &libds(
TYPE char(1) label='Type of format - either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
TYPE char(1) label=
'Format Type: either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
,FMTNAME char(32) label='Format name'
,FMTROW num label='CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
,FMTROW num label=
'CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
,START char(32767) label='Starting value for format'
/*
Keep lengths of START and END the same to avoid this err:
Expand All @@ -14205,18 +14224,8 @@ ods package close;
,NOEDIT num length=3 label='Is picture string noedit?'
,SEXCL char(1) label='Start exclusion'
,EEXCL char(1) label='End exclusion'
,HLO char(13) label='Additional information.
F=Standard format/informat.
H=Range ending value is HIGH.
I=Numeric informat.
J=Justification for an informat.
L=Range starting value is LOW.
M=MultiLabel.
N=Format or informat has no ranges, including no OTHER= range.
O=Range is OTHER.
R=ROUND option is in effect.
S=Specifies that NOTSORTED is in effect.
U=Specifies that the UPCASE option for an informat be used.'
,HLO char(13) label=
'More info: https://core.sasjs.io/mddl__sas__cntlout_8sas_source.html'
,DECSEP char(1) label='Decimal separator'
,DIG3SEP char(1) label='Three-digit separator'
,DATATYPE char(8) label='Date/time/datetime?'
Expand Down
1 change: 1 addition & 0 deletions base/mp_loadformat.sas
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
@li mp_aligndecimal.sas
@li mp_cntlout.sas
@li mp_lockanytable.sas
@li mp_md5.sas
@li mp_storediffs.sas
<h4> Related Macros </h4>
Expand Down
36 changes: 22 additions & 14 deletions ddl/mddl_sas_cntlout.sas
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,34 @@
(given various practical restrictions) are described here to enable
consistency when dealing with format data.
The HLO variable may have a number of values, documented here due to the
256 char label description length limit:
F=Standard format/informat.
H=Range ending value is HIGH.
I=Numeric informat.
J=Justification for an informat.
L=Range starting value is LOW.
M=MultiLabel.
N=Format or informat has no ranges, including no OTHER= range.
O=Range is OTHER.
R=ROUND option is in effect.
S=Specifies that NOTSORTED is in effect.
U=Specifies that the UPCASE option for an informat be used.
**/


%macro mddl_sas_cntlout(libds=WORK.CNTLOUT);

proc sql;
create table &libds(
TYPE char(1) label='Type of format - either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
TYPE char(1) label=
'Format Type: either N (num fmt), C (char fmt), I (num infmt) or J (char infmt)'
,FMTNAME char(32) label='Format name'
,FMTROW num label='CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
,FMTROW num label=
'CALCULATED Position of record by FMTNAME (reqd for multilabel formats)'
,START char(32767) label='Starting value for format'
/*
Keep lengths of START and END the same to avoid this err:
Expand All @@ -35,18 +53,8 @@
,NOEDIT num length=3 label='Is picture string noedit?'
,SEXCL char(1) label='Start exclusion'
,EEXCL char(1) label='End exclusion'
,HLO char(13) label='Additional information.
F=Standard format/informat.
H=Range ending value is HIGH.
I=Numeric informat.
J=Justification for an informat.
L=Range starting value is LOW.
M=MultiLabel.
N=Format or informat has no ranges, including no OTHER= range.
O=Range is OTHER.
R=ROUND option is in effect.
S=Specifies that NOTSORTED is in effect.
U=Specifies that the UPCASE option for an informat be used.'
,HLO char(13) label=
'More info: https://core.sasjs.io/mddl__sas__cntlout_8sas_source.html'
,DECSEP char(1) label='Decimal separator'
,DIG3SEP char(1) label='Three-digit separator'
,DATATYPE char(8) label='Date/time/datetime?'
Expand Down

0 comments on commit f4a4263

Please sign in to comment.