The Extra Data Segment (XDS) [ HP DeskManager Customization ] MPE/iX 5.0 Documentation
HP DeskManager Customization
The Extra Data Segment (XDS)
An Extra Data Segment allows processes running in the same job or
session, access to common information. This is necessary if they are to
exchange data. Applications which run under HP Desk are provided with an
XDS, called "EX", containing the information shown below.
The Fields in the XDS
filename
Length: 36 characters.
Space filled if less than 36 characters. Used for passing the filename
holding the item during COPY TO or COPY FROM operations. It can contain
a lockword.
Also used to pass the name of the file containing a script to be executed
when using Interrupt Mode 15.
subject
Length: 60 characters.
Space filled if less than 60 characters. Holds the subject of items for
retrieve operations and can be filled in by the application for PUT
operations. If this is not filled in, the document subject is usually
used. If it does not have one, the user is prompted for a subject or the
filename is used.
effective_gmt
Length: 32 bit number.
This is the absolute create time/date in seconds since 1st January 1961.
It is standardized to Greenwich Mean Time (GMT).
gmt_offset
Length: 32 bit number.
This is the offset of the local time from GMT. Local time is defined by
the Administrator in the Mailconfig's Data menu. It is used with
effective_gmt to obtain a local time (as given by date_yymmdd and
time_hhmm) and can be a negative number.
date_yymmdd
Length: 6 characters.
Passed back on retrieve operations. It is the creation date of the item
in local time, or for items passed to HP Desk it is the time at which the
item was passed. It is in the format Year(yy)Month(mm)Day(dd).
time_hhmm
Length: 4 characters.
Passed back on retrieve operations. It is the creation time of the item
in local time. It is in the format Hour(hh)minutes(mm).
NOTE Created date and time are in local time. For example, a message
which shows created 920823 time 0625 in London, England would
appear as created 920823 time 2225 in Oregon, USA because an eight
hour time difference applies.
creator_name
Length: 36 characters.
This is passed back from HP Desk on retrieve operations. It is in the
format Surname,Firstname Secondname. It is used for HP File/Library
insertions to give the author's name.
creator_node
Length: 8 characters.
Passed back from HP Desk on retrieve operations. It is in the format
Location(6 chars)Sublocation(2 chars).
NOTE The creator of an item passed to HP Desk is always set to the name
and node of the HP Desk user currently signed on.
item_type
Length: 16 bit number.
This number represents the type of file being accessed.
nl_flags
Length: 16 bit number.
If USASCII, the value is set to zero (0). Otherwise, if an Asian
language (in the 16-bit version of HP Desk) is used, it will be set to
the Native Language number.
user_interaction
Length: 16 bit number.
For items passed to HP Desk (Modes 4, 6, 9, and 13) this indicates
whether prompting of the user is allowed. It usually means that if the
subject of the item is not given in the XDS and the document does not
have a subject, the user is either asked for it, if user_interaction is
set to 1, or the filename is used as the subject, if user_interaction is
set to 0.
It is also used for getting items from HP Desk if the supplied subject is
ambiguous.
instructions
Length: 16 bit number.
Used for items passed to HP Desk via Interrupt Modes 2 and 3. It
indicates whether standard instructions should be given to the user
first. If set to 0, no instructions are given, if set to 1 instructions
are given.
text_type
Length: 16 bit number.
For items passed to HP Desk with filecode equal to 0, this indicates
whether they should be interpreted as displayable text items or
non-displayable MPE files. If set to 0 they are MPE files, if set to 1
they are text.
filecode
Length: 16 bit number.
For files returned from HP Desk, this holds the original filecode of the
item.
When converting files (Interrupt Mode 10) this should hold the filecode
of the target document type.
catalog_name
Length: 60 characters.
This is only used if HP File/Library is installed. It holds the target
catalog within the Library when you are copying to the Library. If this
catalog does not exist, or is ambiguous, the user will be prompted for
the information.
father_pin
Length: 16 bit number.
This is the PIN (Process Identification Number) of the father of the
application (HP Desk).
application_pin
Length: 16 bit number.
This is the PIN (Process Identification Number) of the son process (the
application running under HP Desk).
NOTE The application process can check whether it is a son of HP Desk by
reading the information in the XDS, and checking that its father's
PIN (using the FATHER intrinsic) is the same as the father_pin
field and its own PIN (using the PROCINFO intrinsic) is the same as
the application_pin field. A more rigorous check could be done by
using PROCINFO to check that the father process program name is
HPMAIL.HPMAIL.SYS.
username
Length: 60 characters.
This is space filled if it is less than 60 characters. It is always set
to the username of the person signed on to HP Desk and invoking this
application.
usernode
Length: 8 characters.
This is the node name of the person signed on to HP Desk and invoking
this application.
group_capability
Length: 8 bytes (64 bits).
This is the 64-bit array (packed) which indicates true for all groups of
which the person invoking the application is a member. The values follow
the numbered descriptions set up in the security menu of the Configurator
(see HP DeskManager Administration).
The names associated with the groups are site definable. The meanings of
the first 16 groups are defined by Hewlett-Packard and represent special
functions that the current user may be permitted to perform.
terminal_type
Length: 16 bit number.
The number which represents the type of terminal the user is using. (See
Appendix A .)
cat_keywords
Length: 80 characters
This is used when HP File/Library is installed and Interrupt Mode 9 is
chosen. It holds the keywords associated with an item.
cat_keywords_len
Length: 16 bit number.
Length of the keywords used.
cat_comments
Length: 80 characters.
Used if HP File/Library is installed and Interrupt Mode 9 is used. It
holds comments associated with the item.
cat_comments_len
Length: 16 bit number.
Length of the comments used.
help_page
Length: 16 bit number.
Used in conjunction with Interrupt Mode 11, it gives the starting page
number for Help.
language
Length: 16 bit number.
Language number being used in HP Desk. (See the table used for the
<LANGUAGE> script command in "Active Functions" .)
dmy_flag
Length: 16 bit number.
Day, month, year flag. This is 0 if the date format for this
installation is mmddyy, 1 if the date format is ddmmyy.
principal_number
Length: 32 bit number.
This is a unique number that identifies the user on whose behalf the work
is being done.
user_number
Length: 32 bit number.
This is a unique number that identifies the current user.
Note that if principal_number is the same as user_number then the user is
working on his own behalf (that is not as a designate).
env_item_number
Length: 16 bit number.
This is the item number to be returned when using Interrupt Mode 12.
urgent_message
Length: 16 bit number.
This is used with Interrupt Mode 14 and indicates whether the message is
urgent or not. If set to 1, the message is urgent, if set to 0, the
message is not urgent.
Examples of XDS Structure
These are the declarations we recommend appear at the beginning of any
programs which use the XDS. A copy of the Pascal version is provided in
the file EXPORTDF.MAILLIB.HPOFFICE.
Pascal
Const
len_export_info = 256;
hpdeskproccontrol = 'HPDESKPROCCONTROL ';
hpdeskerr = 'HPDESKERR ';
{ the modes for interrupt }
HPD_interrupt_suspend = 1;
HPD_interrupt_return_file = 2;
HPD_interrupt_get_file = 3;
HPD_interrupt_pass_to_WA = 4;
HPD_interrupt_get_from_WA = 5;
HPD_interrupt_update_WA = 6;
HPD_interrupt_init_forms = 7;
HPD_interrupt_get_formdata = 8;
HPD_interrupt_pass_to_lib = 9;
HPD_interrupt_convert = 10;
HPD_interrupt_help = 11;
HPD_interrupt_item_num = 12;
HPD_interrupt_item_subj = 13;
HPD_interrupt_newmail_check = 14;
HPD_interrupt_script_file = 15;
HPD_interrupt_sign_off = 16;
Type
{ general declarations }
SHORTINT = -32768..32767;
PAC2 = packed array [1..2 ] of CHAR;
PAC4 = packed array [1..4 ] of CHAR;
PAC6 = packed array [1..6 ] of CHAR;
PAC8 = packed array [1..8 ] of CHAR;
PAC36 = packed array [1..36] of CHAR;
PAC60 = packed array [1..60] of CHAR;
PAC80 = packed array [1..80] of CHAR;
GROUP_SET_TYPE = packed array [1..64] of BOOLEAN;
{ specific types }
EXPORT_ID_TYPE = record case BOOLEAN of
true : ( int : SHORTINT );
false : ( name : PAC2 );
end;
EXPORT_INFO_ARRAY = array [1..len_export_info] of SHORTINT;
EXPORT_INFO_TYPE = record case BOOLEAN of
true : ( whole : EXPORT_INFO_ARRAY );
false : ( filename : PAC36;
subject : PAC60;
effective_gmt : INTEGER;
gmt_offset : INTEGER;
date_yymmdd : PAC6;
time_hhmm : PAC4;
creator_name : PAC36;
creator_node : PAC8;
item_type : SHORTINT;
nl_flags : SHORTINT;
user_interaction : SHORTINT;
instructions : SHORTINT;
text_type : SHORTINT;
filecode : SHORTINT;
catalog_name : PAC60;
father_pin : SHORTINT;
application_pin : SHORTINT;
username : PAC36;
usernode : PAC8;
group_capability : GROUP_SET_TYPE;
terminal_type : SHORTINT;
cat_keywords : PAC80;
cat_keywords_len : SHORTINT;
cat_comments : PAC80;
cat_comments_len : SHORTINT;
help_page : SHORTINT;
language : SHORTINT;
dmy_flag : SHORTINT;
principal_number : INTEGER;
user_number : INTEGER;
env_item_num : SHORTINT;
urgent_message : SHORTINT;
);
end;
Const
export_info_init= EXPORT_INFO_ARRAY [len_export_info of 0];
export_info_dseg_id = EXPORT_ID_TYPE [ name : 'EX' ];
FORTRAN
C
C
C --- FORTRAN version of the exportdf.maillib.hpoffice file.
C
integer exportdf(256)
character*36 filename
character*60 subject
integer*4 effectivegmt, gmtoffset
character*6 dateyymmdd
character*4 timehhmm
character*36 creatorname
character*8 creatornode
integer*2 itemtype, nlflags, userinteraction, instructions
integer*2 texttype, filecode
character*60 catalogname
integer*2 fatherpin, applicationpin
character*36 username
character*8 usernode
logical groupcapability(4)
integer*2 terminaltype
character*80 catkeywords
integer*2 catkeywordslen
character*80 catcomments
integer*2 catcommentlen, helppage, language
integer*2 dmyflag
integer*4 principalnumber, usernumber
integer*2 envitemnum
integer*2 urgentmessage
C
C -- Now the equivalence to produce the structure of the XDS
C
equivalence(filename,exportdf(1))
equivalence(subject,exportdf(19))
equivalence(effectivegmt,exportdf(49))
equivalence(gmtoffset,exportdf(51))
equivalence(dateyymmdd,exportdf(53))
equivalence(timehhmm,exportdf(56))
equivalence(creatorname,exportdf(58))
equivalence(creatornode,exportdf(76))
equivalence(itemtype,exportdf(80))
equivalence(nlflags,exportdf(81))
equivalence(userinteraction,exportdf(82))
equivalence(instructions,exportdf(83))
equivalence(texttype,exportdf(84))
equivalence(filecode,exportdf(85))
equivalence(catalogname,exportdf(86))
equivalence(fatherpin,exportdf(116))
equivalence(applicationpin,exportdf(117))
equivalence(username,exportdf(118))
equivalence(usernode,exportdf(136))
equivalence(groupcapability,exportdf(140))
equivalence(terminaltype,exportdf(144))
equivalence(catkeywords,exportdf(145))
equivalence(catkeywordslen,exportdf(185))
equivalence(catcomments,exportdf(186))
equivalence(catcommentslen,exportdf(226))
equivalence(helppage,exportdf(227))
equivalence(language,exportdf(228))
equivalence(dmyflag,exportdf(229))
equivalence(principalnumber,exportdf(230))
equivalence(usernumber,exportdf(232))
equivalence(envitemnum,exportdf(234))
equivalence(urgentmessage,exportdf(235))
C
COBOL
01 EXPORT-INFO-ARRAY.
03 EXPORT-ITEM PIC S9(4) COMP OCCURS 256.
01 EXPORT-INFO-STRUCTURE REDEFINES EXPORT-INFO-ARRAY.
03 FILENAME PIC X(36).
03 SUBJECT PIC X(60).
03 EFFECTIVE-GMT PIC S9(8) COMP.
03 GMT-OFFSET PIC S9(8) COMP.
03 DATE-YYMMDD PIC X(6).
03 TIME-HHMM PIC X(4).
03 CREATOR-NAME PIC X(36).
03 CREATOR-NODE.
05 LOCATION-NAME PIC X(6).
05 SUB-LOCATION PIC XX.
03 ITEM-TYPE PIC S9(4) COMP.
03 NL-FLAGS PIC S9(4) COMP.
03 USER-INTERACTION PIC S9(4) COMP.
88 USER-INTERACTION-YES VALUE 1.
88 USER-INTERACTION-NO VALUE 0.
03 INSTRUCTIONS PIC S9(4) COMP.
88 INSTRUCTIONS-YES VALUE 1.
88 INSTRUCTIONS-NO VALUE 0.
03 TEXT-TYPE PIC S9(4) COMP.
88 TEXT-TYPE-YES VALUE 1.
88 TEXT-TYPE-NO VALUE 0.
03 FILECODE PIC S9(4) COMP.
03 CATALOG-NAME PIC X(60).
03 FATHER-PIN PIC S9(4) COMP.
03 APPLICATION-PIN PIC S9(4) COMP.
03 USERNAME PIC X(36).
03 USERNODE.
05 USER-LOCATION PIC X(6).
05 USER-SUB-LOCATION PIC XX.
03 GROUP-CAPABILITY.
05 CAPABILITY PIC S9(4) COMP OCCURS 4.
03 TERMINAL-TYPE PIC S9(4) COMP.
03 CAT-KEYWORDS PIC X(80).
03 CAT-KEYWORDS-LEN PIC S9(4) COMP.
03 CAT-COMMENTS PIC X(80).
03 CAT-COMMENTS-LEN PIC S9(4) COMP.
03 HELP-PAGE PIC S9(4) COMP.
03 LANGUAGE PIC S9(4) COMP.
03 DMY-FLAG PIC S9(4) COMP.
88 EUROPEAN VALUE 1.
88 US VALUE 0.
03 PRINCIPAL-NUMBER PIC S9(8) COMP.
03 USER-NUMBER PIC S9(8) COMP.
03 ENV-ITEM-NUMBER PIC S9(4) COMP.
03 URGENT-MESSAGE PIC S9(4) COMP.
88 URGENT-MESSAGE-YES VALUE 1
88 URGENT-MESSAGE-NO VALUE 0
03 FILLER PIC X(42).
MPE Intrinsics Used with the XDS
The intrinsics GETDSEG, DMOVIN, DMOVOUT, PUTJCW and FINDJCW are used to
access the information in the XDS. FREEDSEG is needed for error checking,
PROCINFO can be used to find out if you are running under HP Desk and
ACTIVATE is used to fire HP Desk and suspend the son application.
MPE/iX 5.0 Documentation