$$SUBGET |
Given the message number, returns the subject of a
message. Any ~U~ are automatically converted to up-arrow (^). If the message
does not exist, returns null.
Compare to ZSUBJ^XMXUTIL2 and SUBJ^XMXUTIL2 (DBIA 2736).
Usage: S A=$$SUBGET^XMGAPI0(XMZ)
Example:
W $$SUBGET^XMGAPI0(51537)
zzzzzz message subject zzzzz
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
XMZ |
Input |
Message IEN in the MESSAGE file (3.9), of the message
whose subject you wish to get.
|
|
$$SUBCHK |
Checks a prospective message subject to see if it
passes validity checks/input transform. If valid, it returns the subject. If
not valid, it returns an error string explaining why it's not valid. Leading
and trailing blanks are automatically removed. Up-arrows (^) are
automatically converted to "~U~". Function can be set to be interactive (to
display results of the check to the screen) or non-interactive. In
interactive mode, control characters are removed, too.
Compare to VSUBJ^XMXAPI (DBIA 2728).
Usage: S A=$$SUBCHK^XMGAPI0(XMSUB,XMFLG)
Parameters:
XMSUB - string to be validated as a message subject
XMFLG - interactive, and display results to the user, too? (0=no; 1=yes)
Returns:
If OK: ^ valid string
If error: error number ^ string
Possible results, in actual order:
Subject is too long
Non-interact: 3-Entered subject too long ^$E(<subject>,1,65)
Interactive: "Entered subject too long "1^$E(<subject>,1,250)
At this point, leading and trailing blanks are removed, and up-arrows (^) are
converted to ~U~.
Subject contains control characters
Non-interact: 5-Subject cannot contain control characters.^<subject>
Interactive: "Control characters removed (<subject> is Subject accepted)."
(Control characters are removed and checking continues.)
Subject is null
Non-interact: <subject>
Interactive: <subject>
Subject is "?"
Non-interact: 4-Enter a Message Subject, between 3 & 65 characters long or
'^' to exit.^<subject>
Interactive: "Enter a Message Subject, between 3 & 65 characters long or '^'
to exit."
1^<subject>
Subject is too short
Non-interact: 1-SUBJECT must be at least 3 characters long.^<subject>
Interactive: "SUBJECT must be at least 3 characters long."
1^<subject>
Subject is reserved format
Non-interact: 2-Subject names of this format (1""R""1.N) are RESERVED
^<subject>
Interactive: "Subject names of this format (1""R""1.N) are RESERVED"
1^<subject>
Subject is OK
Non-interact: ^<subject>
Interactive: ^<subject>
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
XMSUB |
Input |
Proposed message subject.
|
XMFLG |
Input |
Should results of the check be written to the screen,
too? Possible values are:
0 - no
1 - yes
|
|