Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(B) (C/S)



Section for use

Declaration.


Syntax

XML_IDF XmlIdentifierName  DecimalSeparator  DateFmt  Time_Fmt  TMS_Fmt  IdentifierType


DecimalSeparator

*DEC_SEP(SepChar) | None

DateFmt

*DATE_FMT(PredDateFmt | PersDateFmt) | None

Time_Fmt

*TIME_FMT(PredTimeFmt | PersTimeFmt) | None

TMS_Fmt

*TMS_FMT(PredTmsFmt | PersTmsFmt) | None

IdentifierType

*SEQ | None

SepChar

<One-char long AlphaConstant> | <One-char long Alpha variable>

PredDateFmt

'*ISO' |'*EUR' | '*USA' |'*JIS' | '*SYS' |'*DMY' | '*MDY' |'*YMD' | '*JUL' | <four-char long named constant> | <four-char long alpha variable>

PredTimeFmt

'*ISO' |'*ISO8601' |'*EUR' | '*USA' |'*JIS' | '*HMS' |'*SYS' | <four-char long named constant> | <four-char long alpha variable>

PredTmsFmt

'*ISO8601_W/O_TZD'

The date and time formats are those used for the &ALPHA_TO_DATE and &ALPHA_TO_TIME functions.

The format * ISO8601 is identical to the format * HMS, and the format * ISO8601_W / O_TZD (ISO 8601 without Time Zone Designator) corresponds to YYYY-MM-DDThh: mm: ss.nnnnnn (where the part .nnnnnn can be empty, or go up to 6 digits if microseconds are present).


PersDateFmt

<8- or 10-char AlphaConstant> | <8- or 10-char alpha variable>

PersTimeFmt

<8-char AlphaConstant> | <8-char alpha variable>

PersTmsFmt

<23- or 26-char AlphaConstant> | <23- or 26-char alpha variable>


Personalised formats are made up of blocks: YYYY or YY for years, MM for months, DD for days, HH for hours, mm for minutes, SS for seconds and ssssss or sss for milliseconds or microseconds. Only one separator character is permitted between each block.


Description

Declaration of an XML identifier named XmlIdentifierName. This declaration has a global scope in the source code. This identifier cannot be a parameter (in a program or procedure).


The *ISO format is the default format for evaluating (i.e. converting between the alphanumerical value present in the XML file and the Adelia type) numerical, DATE, TIME and TIMESTAMP types.


The *FMT_DATE, *FMT_TIME and *FMT_TMS options can be used to specify formats other than the *ISO format when evaluating numerical DATE, TIME and TIMESTAMP values.

The *DEC_SEP option can be used to specify a decimal separator other than the "."


With the Java platform, the *SYS format is equivalent to the *ISO format.


IdentifierType determines how the XML file is opened. By default, files are opened in DOM mode (no value is assigned to IdentifierType) which loads the XML file into memory and allows files to be open in read and write mode, XPATH queries are permitted. The *SEQ option specifies sequential opening, in which the XML file is not loaded into memory; with this option the file is opened in read-only mode in order to read each node in the XML file in sequence, retrieving its value and the values of any attributes.


Notes:

The *SEQ type can be used with the following instructions only:

    • XML_OPEN in *READ mode without the *VERIFY option
    • XML_READ_NEXT
    • XML_GET_VAL
    • XML_CLOSE


- The *SEQ type makes it possible to read very large XML files, as it does not load the full DOM tree into memory (and as 32-bit Windows processes are unable to allocate more than 2 Gb of memory, certain very large XML files cannot be read in DOM mode). On the other hand, this sequential type is less powerful than DOM mode because XPATH queries are not supported.


Additional note: You cannot use the same XML identifier in XML instructions in both a client part and a server part of a particular program, or in server parts on different logical servers.


Using XML instructions in a Web client program

  • If the Web application runs in Websphere version 5.1 or 6.0, set the "Class loader mode" general property in the application's Websphere setup to PARENT_LAST rather than PARENT_FIRST.

    No action is required for version 6.1 and later.

  • If the application runs with a version of Tomcat that uses JDK 1.4 (in principle, Tomcat version 4.1.x or 5.0.x):
    • If Tomcat is run as a Windows service, or by startup.bat, copy the files located in "%ADELIWS%\JDK\jre\lib\endorsed" on your development workstation to Tomcat's "common\endorsed" subfolder.

    • If Tomcat is run by the "Start Tomcat" startup shortcut (or the menu option) (via bootstrap.jar):

      • either specify the directive -Djava.endorsed.dirs="%ADELIWS%\JDK\jre\lib\endorsed" in your Java run command,

      • or else create an "endorsed" subfolder in the "lib" folder of your JRE, into which the files located in "%ADELIWS%\JDK\jre\lib\endorsed" on your development workstation can be copied.


Using XML intructions in Java with JRE 1.4

You must place the files contained in "%ADELIWS%\JDK\jre\lib\endorsed" on your development workstation into "endorsed" (either by creating an "endorsed" subfolder in the JRE's "lib" folder or by running the Java command with the directive -Djava.endorsed.dirs="xxxxx").


Example

XML_IDF Xml1

XML_IDF Xml2 *SEC_SEP(', ') *DATE_FMT('*EUR') *TMS_FMT('DD/MM/YYYY-HH:mm:SS.ssssss')

XML_IDF Xml3 *DATE_FMT('DD/MM/YYYY') *TIME_FMT('HH:mm:SS')




↑ Top of page

  • Aucune étiquette