myaccount.worldprogramming.com€¦ · Reference for language elements Version 3.3 2 Contents How...

1505
Reference for language elements Version 3.3 WPS Reference for Language Elements “Look up the syntax of language elements supported by the World Programming System (WPS).” Version: 3.3.12 Copyright © 2002-2021 World Programming Limited www.worldprogramming.com

Transcript of myaccount.worldprogramming.com€¦ · Reference for language elements Version 3.3 2 Contents How...

  • Reference for language elementsVersion 3.3

    WPS Reference forLanguage Elements

    “Look up the syntax of language elementssupported by the World Programming

    System (WPS).”

    Version: 3.3.12Copyright © 2002-2021 World Programming Limited

    www.worldprogramming.com

  • Reference for language elementsVersion 3.3

    2

    Contents

    How to read EBNF................................................................................. 11

    Common Syntax.....................................................................................13Identifying Access and View Descriptors.....................................................................................13

    Access Descriptors............................................................................................................13View Descriptors................................................................................................................13

    Identifying Views.......................................................................................................................... 13Identifying Datasets......................................................................................................................14

    Input dataset......................................................................................................................14Output dataset................................................................................................................... 14Dataset...............................................................................................................................14

    Expressions.................................................................................................................................. 14Language of SAS Expressions......................................................................................... 14SQL Expressions...............................................................................................................15

    External Files................................................................................................................................16LOCALE Values........................................................................................................................... 16ENCODING Values...................................................................................................................... 19Variable Lists................................................................................................................................26

    WPS Core................................................................................................27Global statements........................................................................................................................ 27

    Comment.......................................................................................................................... 27CATNAME..........................................................................................................................27DSNEXST.......................................................................................................................... 27ENDSAS............................................................................................................................ 27ENDWPS........................................................................................................................... 28FILENAME Statements......................................................................................................28FOOTNOTE....................................................................................................................... 35%INCLUDE........................................................................................................................ 35LIBNAME........................................................................................................................... 35MISSING............................................................................................................................36ODS Statements................................................................................................................36OPTIONS...........................................................................................................................48PAGE................................................................................................................................. 48RUN................................................................................................................................... 49SKIP...................................................................................................................................49SYSTASK Statements.......................................................................................................49TITLE................................................................................................................................. 50WAITFOR...........................................................................................................................50X Statements..................................................................................................................... 50

  • Reference for language elementsVersion 3.3

    3

    System options.............................................................................................................................51Non OS-specific system options....................................................................................... 52IBM mainframe specific system options..........................................................................103

    Formats.......................................................................................................................................130Core formats....................................................................................................................131Basic character formats...................................................................................................135Bidirectional formats........................................................................................................ 141Unicode formats.............................................................................................................. 145Simple numeric formats...................................................................................................154Numeric date formats......................................................................................................186ISO8601 date formats..................................................................................................... 234International date formats................................................................................................249NLS-sensitive date formats............................................................................................. 269NLS-sensitive money formats......................................................................................... 284NLS-sensitive numeric formats....................................................................................... 290

    Informats.....................................................................................................................................296Core informats................................................................................................................. 298Basic character informats................................................................................................299Bidirectional informats..................................................................................................... 306Unicode informats............................................................................................................308Simple numeric informats................................................................................................316Numeric date informats................................................................................................... 333ISO8601 date informats.................................................................................................. 345NLS-sensitive date informats.......................................................................................... 356NLS-sensitive money informats.......................................................................................358NLS-sensitive numeric informats.....................................................................................361

    Components................................................................................................................................364HASH Component........................................................................................................... 364HITER Component.......................................................................................................... 369JAVAOBJ Component..................................................................................................... 370

    DATA Step Statements..............................................................................................................373_NEW_.............................................................................................................................373ABORT.............................................................................................................................373ARRAY.............................................................................................................................373ATTRIB............................................................................................................................ 373BY.................................................................................................................................... 373CALL................................................................................................................................ 374CARDS.............................................................................................................................374CARDS4...........................................................................................................................374CONTINUE...................................................................................................................... 374DATA................................................................................................................................374DATALINES..................................................................................................................... 374DATALINES4................................................................................................................... 374DECLARE........................................................................................................................ 375DELETE........................................................................................................................... 375DESCRIBE.......................................................................................................................375

  • Reference for language elementsVersion 3.3

    4

    DO....................................................................................................................................375DO, iterative.....................................................................................................................375DO UNTIL........................................................................................................................376DO WHILE.......................................................................................................................376DROP...............................................................................................................................376END..................................................................................................................................376ERROR............................................................................................................................ 376EXECUTE........................................................................................................................ 376FILE..................................................................................................................................377FORMAT..........................................................................................................................380GO TO............................................................................................................................. 380IF, subsetting................................................................................................................... 380IF-THEN/ELSE.................................................................................................................380INFILE..............................................................................................................................381INFORMAT...................................................................................................................... 382INPUT.............................................................................................................................. 383KEEP................................................................................................................................384LABEL..............................................................................................................................384Labels,Statement............................................................................................................. 384LEAVE..............................................................................................................................384LENGTH...........................................................................................................................385LINK................................................................................................................................. 385LIST..................................................................................................................................385MERGE............................................................................................................................385MODIFY........................................................................................................................... 385OUTPUT.......................................................................................................................... 386PUT..................................................................................................................................386PUTLOG.......................................................................................................................... 389REDIRECT.......................................................................................................................389REMOVE..........................................................................................................................389RENAME..........................................................................................................................389REPLACE........................................................................................................................ 389RETAIN............................................................................................................................389RETURN.......................................................................................................................... 390SELECT........................................................................................................................... 390SET.................................................................................................................................. 390SKIP.................................................................................................................................390STOP............................................................................................................................... 391Sum..................................................................................................................................391UPDATE...........................................................................................................................391WHERE............................................................................................................................391DO, iterative.....................................................................................................................391DO UNTIL........................................................................................................................392DO WHILE.......................................................................................................................392GO TO............................................................................................................................. 392IF, subsetting................................................................................................................... 392

  • Reference for language elementsVersion 3.3

    5

    IF-THEN/ELSE.................................................................................................................392Describing data in a DATA step..................................................................................... 393

    Data Step Functions and Call Routines.................................................................................... 393Bitwise functions..............................................................................................................393Combination functions and call routines......................................................................... 399Input and output functions and call routines................................................................... 407Date and time functions and call routines.......................................................................443Double-Byte functions and call routines..........................................................................479Decision forest functions and call routines..................................................................... 510External file functions and call routines.......................................................................... 514External routine functions and call routines.................................................................... 527Financial functions and call routines...............................................................................528Internet functions and call routines................................................................................. 583ISPF call routines............................................................................................................ 586Macro functions and call routines................................................................................... 587Mathematical functions and call routines........................................................................ 590NLS functions and call routines...................................................................................... 667Probability functions and call routines.............................................................................670Regular expression functions and call routines.............................................................. 693Random number functions and call routines.................................................................. 711Special functions and call routines................................................................................. 792Statistical functions..........................................................................................................803String functions and call routines....................................................................................834Trunc functions and call routines.................................................................................... 968Variable functions and call routines................................................................................ 972Web functions and call routines......................................................................................982Zipcode functions and call routines.................................................................................984

    Dataset Options..........................................................................................................................988BUFNO.............................................................................................................................988BUFSIZE..........................................................................................................................988COMPRESS.....................................................................................................................988DROP...............................................................................................................................989FILECLOSE..................................................................................................................... 989FIRSTOBS....................................................................................................................... 989IN......................................................................................................................................990INDEX.............................................................................................................................. 990KEEP................................................................................................................................990LABEL..............................................................................................................................990OBS..................................................................................................................................991OBSBUF.......................................................................................................................... 991OUTREP.......................................................................................................................... 991POINTOBS.......................................................................................................................992RENAME..........................................................................................................................992REPLACE........................................................................................................................ 992SPILL............................................................................................................................... 993WHERE............................................................................................................................993

  • Reference for language elementsVersion 3.3

    6

    Procedures..................................................................................................................................993ACCESS Procedure........................................................................................................ 993APPEND Procedure........................................................................................................ 996APPSRV Procedure.........................................................................................................997CATALOG Procedure....................................................................................................1014CDISC Procedure..........................................................................................................1017CHART Procedure.........................................................................................................1020CIMPORT Procedure.....................................................................................................1023COMPARE Procedure...................................................................................................1024CONTENTS Procedure................................................................................................. 1026COPY Procedure...........................................................................................................1027CORR Procedure...........................................................................................................1028CPORT Procedure.........................................................................................................1031DATASETS Procedure.................................................................................................. 1033DBLOAD Procedure...................................................................................................... 1039DELETE Procedure....................................................................................................... 1042EXPORT Procedure...................................................................................................... 1043FMTLIB Procedure........................................................................................................ 1045FORMAT Procedure......................................................................................................1049FORMS Procedure........................................................................................................ 1052FREQ Procedure........................................................................................................... 1053HADOOP Procedure......................................................................................................1060HTTP Procedure............................................................................................................1062IMPORT Procedure....................................................................................................... 1063JSON Procedure............................................................................................................1067JAVAINFO Procedure....................................................................................................1069MEANS Procedure........................................................................................................ 1070OPTIONS Procedure.....................................................................................................1075OPTLOAD Procedure....................................................................................................1075OPTSAVE Procedure.................................................................................................... 1076PDS Procedure..............................................................................................................1076PDSCOPY Procedure....................................................................................................1077PLOT Procedure............................................................................................................1078PRINT Procedure.......................................................................................................... 1079PRINTTO Procedure..................................................................................................... 1082PWENCODE Procedure................................................................................................ 1082R Procedure.................................................................................................................. 1083RANK Procedure........................................................................................................... 1095RELEASE Procedure.....................................................................................................1096REPORT Procedure...................................................................................................... 1097SOAP Procedure........................................................................................................... 1101SORT Procedure........................................................................................................... 1102SOURCE Procedure......................................................................................................1104SQL Procedure..............................................................................................................1105STANDARD Procedure................................................................................................. 1119SUMMARY Procedure...................................................................................................1120

  • Reference for language elementsVersion 3.3

    7

    TABULATE Procedure...................................................................................................1125TEMPLATE Procedure.................................................................................................. 1128TRANSPOSE Procedure............................................................................................... 1134TRANTAB Procedure.................................................................................................... 1136UNIVARIATE Procedure................................................................................................1137

    Library Engines........................................................................................................................ 1160CVP................................................................................................................................1160SASDASD......................................................................................................................1160SAS7BDAT.................................................................................................................... 1160SD2................................................................................................................................ 1160SASSEQ........................................................................................................................ 1161V8SEQ........................................................................................................................... 1161V9SEQ........................................................................................................................... 1161WPDSEQ....................................................................................................................... 1161WPD...............................................................................................................................1161WPD (z/OS)...................................................................................................................1161WPD1.............................................................................................................................1162WPDV2.......................................................................................................................... 1163WPDV2 (z/OS).............................................................................................................. 1163XML................................................................................................................................1164XPORT...........................................................................................................................1165

    Macros...................................................................................................................................... 1165Automatic Macro Variables........................................................................................... 1165Macro Processor Statements........................................................................................ 1170Macro Processor Functions...........................................................................................1174

    WPS Graphing....................................................................................1180Global Statements....................................................................................................................1180

    AXIS...............................................................................................................................1180FOOTNOTE................................................................................................................... 1181GOPTIONS.................................................................................................................... 1182LEGEND........................................................................................................................ 1183PATTERN...................................................................................................................... 1184SYMBOL........................................................................................................................ 1184

    Graphing Procedures............................................................................................................... 1186GANNO Procedure........................................................................................................1186GBARLINE Procedure...................................................................................................1186GCHART Procedure......................................................................................................1189GOPTIONS Procedure.................................................................................................. 1195GPLOT Procedure.........................................................................................................1195GREPLAY Procedure.................................................................................................... 1198GSLIDE Procedure........................................................................................................1199

    WPS Statistics....................................................................................1201Statistics Procedures................................................................................................................1201

    ACECLUS Procedure.................................................................................................... 1201

  • Reference for language elementsVersion 3.3

    8

    ANOVA Procedure.........................................................................................................1202BOXPLOT Procedure.................................................................................................... 1205CANCORR Procedure...................................................................................................1207CANDISC Procedure.....................................................................................................1209CLUSTER Procedure.................................................................................................... 1211CORRESP Procedure................................................................................................... 1213DISCRIM Procedure......................................................................................................1215DISTANCE Procedure...................................................................................................1219FACTOR Procedure...................................................................................................... 1222FASTCLUS Procedure.................................................................................................. 1226GENMOD Procedure.....................................................................................................1228GLM Procedure............................................................................................................. 1236GLMMOD Procedure.....................................................................................................1243KDE Procedure..............................................................................................................1245LIFEREG Procedure......................................................................................................1247LIFETEST Procedure.................................................................................................... 1251LOESS Procedure......................................................................................................... 1256LOGISTIC Procedure.................................................................................................... 1260MI Procedure................................................................................................................. 1267MIXED Procedure..........................................................................................................1271MODECLUS Procedure.................................................................................................1276NESTED Procedure.......................................................................................................1277NLIN Procedure.............................................................................................................1279NPAR1WAY Procedure................................................................................................. 1285PHREG Procedure........................................................................................................ 1288PRINCOMP Procedure..................................................................................................1293PROBIT Procedure........................................................................................................1295REG Procedure............................................................................................................. 1299SCORE Procedure........................................................................................................ 1308SIMNORMAL Procedure............................................................................................... 1310STDIZE Procedure........................................................................................................ 1311STEPDISC Procedure................................................................................................... 1313SURVEYSELECT Procedure........................................................................................ 1315TREE Procedure............................................................................................................1317TTEST Procedure..........................................................................................................1319VARCLUS Procedure.................................................................................................... 1321VARCOMP Procedure...................................................................................................1323

    WPS Timeseries................................................................................. 1325Timeseries Procedures.............................................................................................................1325

    ARIMA Procedure..........................................................................................................1325EXPAND Procedure...................................................................................................... 1329FORECAST Procedure..................................................................................................1334X12 Procedure...............................................................................................................1336

    WPS Communicate............................................................................ 1343

  • Reference for language elementsVersion 3.3

    9

    Global Statements....................................................................................................................1343ENDRSUBMIT............................................................................................................... 1343RSUBMIT.......................................................................................................................1343SIGNOFF....................................................................................................................... 1346SIGNON.........................................................................................................................1347WAITFOR.......................................................................................................................1350

    Macro Processor Statements...................................................................................................1350%SYSLPUT....................................................................................................................1350%SYSRPUT...................................................................................................................1351

    Procedures................................................................................................................................1351DOWNLOAD Procedure................................................................................................ 1351UPLOAD Procedure...................................................................................................... 1354

    System Options........................................................................................................................ 1357AUTOSIGNON...............................................................................................................1357COMAMID......................................................................................................................1358CONNECTPERSIST......................................................................................................1358CONNECTREMOTE......................................................................................................1358DMR...............................................................................................................................1359SASCMD........................................................................................................................1359SASSCRIPT...................................................................................................................1359

    Data Engines...................................................................................... 1360WPS Engine for Access...........................................................................................................1360

    ACCESS........................................................................................................................ 1360WPS Engine for Actian Matrix................................................................................................. 1364

    ACTIANMATRIX............................................................................................................ 1364WPS Engine for DB2............................................................................................................... 1369

    DB2................................................................................................................................ 1369DB2OLD.........................................................................................................................1379DB2 (for z/OS)...............................................................................................................1386DB2OLD (for z/OS)....................................................................................................... 1393DB2EXT Procedure....................................................................................................... 1397

    WPS Engine for Excel............................................................................................................. 1398EXCEL........................................................................................................................... 1398XLSX..............................................................................................................................1402

    WPS Engine for Greenplum.................................................................................................... 1403GREENPLUM................................................................................................................ 1403

    WPS Engine for Hadoop..........................................................................................................1408HADOOP........................................................................................................................1408

    WPS Engine for Informix......................................................................................................... 1412INFORMIX......................................................................................................................1412

    WPS Engine for Kognito.......................................................................................................... 1416KOGNITIO......................................................................................................................1416

    WPS Engine for MySQL.......................................................................................................... 1421MYSQL...........................................................................................................................1421

    WPS Engine for Netezza......................................................................................................... 1426

  • Reference for language elementsVersion 3.3

    10

    NETEZZA.......................................................................................................................1426NETEZZAM....................................................................................................................1432

    WPS Engine for ODBC............................................................................................................1437ODBC.............................................................................................................................1437

    WPS Engine for OLEDB.......................................................................................................... 1444OLEDB...........................................................................................................................1444

    WPS Engine for Oracle............................................................................................................1452ORACLE........................................................................................................................ 1452ORACLEM..................................................................................................................... 1461

    WPS Engine for PostgreSQL...................................................................................................1471POSTGRESQL.............................................................................................................. 1471

    WPS Engine for Sand..............................................................................................................1475SAND............................................................................................................................. 1475

    WPS Engine for SQL Server................................................................................................... 1480SQLSERVER................................................................................................................. 1480

    WPS Engine for Sybase.......................................................................................................... 1486SYBASE.........................................................................................................................1486

    WPS Engine for Sybase IQ..................................................................................................... 1490SYBASEIQ.....................................................................................................................1490

    WPS Engine for Teradata........................................................................................................1496TERADATA....................................................................................................................1496

    WPS Engine for Vertica........................................................................................................... 1500VERTICA........................................................................................................................1500

    Legal Notices......................................................................................1505

  • Reference for language elementsVersion 3.3

    11

    How to read EBNFEBNF is a textual notation that accompanies significant language structures such as procedures,statements and so on.

    The description of each language concept commences with its EBNF representation .

    Entering textText that should be entered exactly as displayed is shown in a typewriter font :

    OUTPUT ;

    This example describes a fragment of syntax in which the keyword OUTPUT is followed by a semi-coloncharacter: ;. The EBNF version of this fragment is simply the characters: OUTPUT;.

    Generally the case of the text is not significant, but in this reference, it is the convention to use upper-case for keywords.

    Placeholder itemsPlaceholders that should be substituted with relevant, context-dependent text are rendered in lowercase, surrounded by a box :

    OUTPUT data-set-name ;

    Here, the keyword OUTPUT should be entered literally, but data-set-name should be replaced bysomething appropriate to the program – in this case, the name of a dataset to add an observation to.

    OptionalityWhen items are optional, they appear in square brackets [ ] in EBNF :

    OUTPUT [  data-set-name  ] ;

    RepetitionIn EBNF, repetition is denoted by curly braces and ellipsis { … }. An optional separator for multipleinstances is shown just before the ellipsis.

    OUTPUT {  data-set-name  … } ;

    Above, the keyword OUTPUT should be entered literally, and it should be followed by one or morerepetitions of data-set-name - in this case, no separator other than a space has been asked for.

    The example below shows the use of a separator.

    function-name ( {  argument ,  … } ) ;

  • Reference for language elementsVersion 3.3

    12

    ChoicesIn EBNF, the choice is represented by a logical OR symbol | between each option.

    GETNAMES [ YES | NO ]  ;

    In the above example, the keyword GETNAMES should be entered literally, and then either the keywordYES or the keyword NO.

    FragmentsWhen the syntax is too complicated to fit in one definition, it might be broken into fragments:

    PROC PRINT { option … }

    option[ DATA = data-set-name  | LABEL ] 

    Above, the whole syntax is split into separate EBNF fragments. The first indicates that PROC PRINTshould be followed by one or more instances of an option, each of which must adhere to the syntaxgiven in the second diagram.

    Help with reading EBNFThe table below summarises the EBNF conventions used in this reference:

    Convention Description

    [] Optional elements

    {…} Repeated group of elements

    {,…} Separators that enclose iterations of repeated itemsare shown just before the ellipsis

    | Either/or within a selection group enclosed in [ ]. Forexample:

    • [A|B] – choose either A or B• [A|B|] – choose A or B or nothing (i.e. omit the

    group altogether)

    "" Comment – for example, a group title

    monospaced Keywords and separators

    italics variables

    bold Elements presented in their own diagrams, likefragments

    underlined Default selection

  • Reference for language elementsVersion 3.3

    13

    Common SyntaxMany language elements in this manual refer to common syntax constructs such as expressions,datasets or variable lists. They are detailed below.

    Identifying Access and ViewDescriptors

    Access Descriptors

    Access descriptor[  library . ] access-descriptor-name [ .access ]

    View Descriptors

    View descriptor[  library . ] view-descriptor-name [ .view ]

    Identifying Views[  library . ] view-name

  • Reference for language elementsVersion 3.3

    14

    Identifying Datasets

    Input dataset

    Input dataset with optionsdataset i( {  input-dataset-option  … } )

    i See Dataset.

    Output dataset

    Output dataset with optionsdataset i( {  output-dataset-option  … } )

    i See Dataset.

    Dataset

    Dataset[  library . ] dataset-name

    Expressions

    Language of SAS Expressions

    expression[  ( expression ) |

    variable  |array-name

    [  [ { expression,  … } ] |

  • Reference for language elementsVersion 3.3

    15

    { { expression,  … } } |( { expression,  … } )

    ]  |function-name ( {  argument ,  … } ) |[ FIRST. | LAST. ]  by-variable-name  |expression

    [  [ | | ! | OR ]  |[ & | AND ] 

    ] expression |[ ~ | NOT ] expression |- expression |expression [ + | - | * | / | ** ] expression |expression

    [  [ = | GE ]  |[ = | EQ ]  |[ != | ^= | ¬= | NE ] 

    ] [ : ] expression |expression = "bit-test-constant"X  |expression [ NOT ] IN ( { expression,  … } ) |expression || expression i  |expression expression ii  |expression >< expression iii

    i Concatenate.ii Choose maximum.iii Choose minimum.

    SQL Expressions

    SQL expression[  column  |

    function-name ( {  argument ,  … } ) |( SQL_expression ) |SQL_expression

    [  [ | | ! | OR ]  |[ AND | & ] 

    ] SQL_expression |[ ~ | ^ | NOT ] SQL_expression |- SQL_expression |SQL_expression [ + | - | * | / | ** ] SQL_expression |SQL_expression

  • Reference for language elementsVersion 3.3

    16

    [  [ = | GE ]  |[ = | EQ ]  |[ != | ^= | ¬= |  | NE ] 

    ] [ : ] SQL_expression |SQL_expression [ NOT ] BETWEEN SQL_expression AND SQL_expression |SQL_expression IS [ NOT ] [ NULL | MISSING ]  |SQL_expression LIKE SQL_expression |SQL_expression [ CONTAINS | ? ] SQL_expression |SQL_expression *= SQL_expression i

    i Sounds like.

    External FilesExternal files can be referenced in a number of ways.

    [  "quoted-file-name"  |fileref  |fileref ( member ) |fileref ( {  member  … } )

    Not all of the ways of referring to external files are valid in all circumstances. In particular, whenreferring to output files, at least one file must be identified.

    LOCALE ValuesSupported LOCALE Values:

    • Arabic_Algeria• Arabic_Bahrain• Arabic_Egypt• Arabic_Jordan• Arabic_Kuwait• Arabic_Lebanon• Arabic_Morocco• Arabic_Oman

  • Reference for language elementsVersion 3.3

    17

    • Arabic_Qatar• Arabic_SaudiArabia• Arabic_Tunisia• Arabic_UnitedArabEmirates• Bulgarian_Bulgaria• Byelorussian_Belarus• Croatian_Croatia• Czech_CzechRepublic• Danish_Denmark• Dutch_Belgium• Dutch_Netherlands• English_Australia• English_Canada• English_HongKong• English_India• English_Ireland• English_Jamaica• English_NewZealand• English_Singapore• English_SouthAfrica• English_UnitedKingdom• English_UnitedStates• Estonian_Estonia• Finnish_Finland• French_Belgium• French_Canada• French_France• French_Luxembourg• French_Switzerland• German_Austria• German_Germany• German_Liechtenstein• German_Luxembourg• German_Switzerland• Greek_Greece• Hebrew_Israel

  • Reference for language elementsVersion 3.3

    18

    • Hungarian_Hungary• Icelandic_Iceland• Italian_Italy• Italian_Switzerland• Japanese_Japan• Latvian_Latvia• Lithuanian_Lithuania• Norwegian_Norway• Polish_Poland• Portuguese_Brazil• Portuguese_Portugal• Romanian_Romania• Russian_Russia• Serbian_Yugoslavia• Slovak_Slovakia• Slovenian_Slovenia• Spanish_Argentina• Spanish_Bolivia• Spanish_Chile• Spanish_Colombia• Spanish_CostaRica• Spanish_DominicanRepublic• Spanish_Ecuador• Spanish_ElSalvador• Spanish_Guatemala• Spanish_Honduras• Spanish_Mexico• Spanish_Nicaragua• Spanish_Panama• Spanish_Paraguay• Spanish_Peru• Spanish_PuertoRico• Spanish_Spain• Spanish_UnitedStates• Spanish_Uruguay• Spanish_Venezuela

  • Reference for language elementsVersion 3.3

    19

    • Swedish_Sweden• Thai_Thailand• Turkish_Turkey• Ukrainian_Ukraine• Vietnamese_Vietnam

    Unsupported LOCALE Values:

    • Chinese_China• Chinese_HongKong• Chinese_Macau• Chinese_Singapore• Chinese_Taiwan• Korean_Korea

    ENCODING ValuesThe following table shows the character encodings supported by WPS. Refer to the Workbench UserGuide for information about setting character encodings and locale (which may be all that is required inmost cases).

    Only those encodings indicated by Yes in the table are supported in the ENCODING system option.However, all of the options are available for use with INFILE or FILE and other language statementsfor which the ENCODING option is valid.

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    ebcdic037 E037 ibm-037 EBCDIC 037 Old NorthAmerica

    Yes

    ebcdic273 E273 ibm-273 EBCDIC 273 Old Austria/Germany

    Yes

    ebcdic275 E275 ibm-275 EBCDIC 275 Brazil Yes

    ebcdic277 E277 ibm-277 EBCDIC 277 Old Denmark/Norway

    Yes

    ebcdic278 E278 ibm-278 EBCDIC 278 Old Finland/Sweden

    Yes

    ebcdic280 E280 ibm-280 EBCDIC 280 Old Italy Yes

  • Reference for language elementsVersion 3.3

    20

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    ebcdic284 E284 ibm-284 EBCDIC 284 Old Spain/LatinAmerica

    Yes

    ebcdic285 E285 ibm-285 EBCDIC 285 Old UnitedKingdom

    Yes

    ebcdic297 E297 ibm-297 EBCDIC 297 Old France Yes

    ebcdic420 E420 ibm-420 EBCDIC 420 Old Arabic Yes

    ebcdic424 E424 ibm-424 EBCDIC 424 Hebrew Yes

    ebcdic425 E425 ibm-425 EBCDIC 425 Arabic Yes

    ebcdic500 E500 ibm-500 EBCDIC 500 Old International Yes

    ebcdic838 E838 ibm-838 EBCDIC 838 Thai Yes

    ebcdic870 E870 ibm-870 EBCDIC 870 Central Europe Yes

    ebcdic875 E875 ibm-875 EBCDIC 875 Greek Yes

    ebcdic924 E924 ibm-924 EBCDIC 924 European Yes

    ebcdic1025 ECYL ibm-1025 EBCDIC 1025 Cyrillic Yes

    ebcdic1026 ETUR ibm-1026 EBCDIC 1026 Turkish Yes

    ebcdic1047 ELAT ibm-1047 EBCDIC 1047 Latin 1 Yes

    ebcdic1112 EBAL ibm-1112 EBCDIC 1112 Baltic Yes

    ebcdic1122 EEST ibm-1122 EBCDIC 1122 Estonian Yes

    ebcdic1130 EVIE ibm-1130 EBCDIC 1130 Vietnamese Yes

    ebcdic1140 E140 ibm-1140 EBCDIC 1140 North America Yes

    ebcdic1141 E141 ibm-1141 EBCDIC 1141 Austria/Germany Yes

    ebcdic1142 E142 ibm-1142 EBCDIC 1142 Denmark/Norway

    Yes

    ebcdic1143 E143 ibm-1143 EBCDIC 1143 Finland/Sweden Yes

    ebcdic1144 E144 ibm-1144 EBCDIC 1144 Italy Yes

    ebcdic1145 E145 ibm-1145 EBCDIC 1145 Spain/LatinAmerica

    Yes

    ebcdic1146 E146 ibm-1146 EBCDIC 1146 United Kingdom Yes

    ebcdic1147 E147 ibm-1147 EBCDIC 1147 France Yes

    ebcdic1148 E148 ibm-1148 EBCDIC 1148 International Yes

  • Reference for language elementsVersion 3.3

    21

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    ebcdic-any EBCD Any FLG_EBCDIC encoding Yes

    open_ed-420 EOAR ibm-420,swaplfnl Open Edition 420 Old Arabic Yes

    open_ed-424 EOIW ibm-424,swaplfnl Open Edition 424 Hebrew Yes

    open_ed-838 EOTH ibm-838,swaplfnl Open Edition 838 Thai Yes

    open_ed-870 EOL2 ibm-870,swaplfnl Open Edition 870 CentralEurope

    open_ed-875 EOEL ibm-875,swaplfnl Open Edition 875 Greek Yes

    open_ed-924 EOLT ibm-924,swaplfnl Open Edition 924 European Yes

    open_ed-1025 EOCY ibm-1025,swaplfnl Open Edition 1025 Cyrillic Yes

    open_ed-1026 EOTR ibm-1026,swaplfnl Open Edition 1026 Turkish Yes

    open_ed-1047 EOL1 ibm-1047,swaplfnl Open Edition 1047 Latin 1 Yes

    open_ed-1112 EOBL ibm-1112,swaplfnl Open Edition 1112 Baltic Yes

    open_ed-1122 EOET ibm-1122,swaplfnl Open Edition 1122 Estonian Yes

    open_ed-1130 EOVT ibm-1130,swaplfnl Open Edition 1130 Vietnamese Yes

    open_ed-037 EOUS ibm-037,swaplfnl Open Edition 037 Old NorthAmerica

    Yes

    open_ed-273 EODE ibm-273,swaplfnl Open Edition 273 Old Austria/Germany

    Yes

    open_ed-275 EOBR ibm-275,swaplfnl Open Edition 275 Brazil Yes

    open_ed-277 EODA ibm-277,swaplfnl Open Edition 277 OldDenmark/Norway

    Yes

    open_ed-278 EOFI ibm-278,swaplfnl Open Edition 278 Old Finland/Sweden

    Yes

    open_ed-280 EOIT ibm-280,swaplfnl Open Edition 280 Old Italy Yes

    open_ed-284 EOES ibm-284,swaplfnl Open Edition 284 Old Spain Yes

    open_ed-285 EOUK ibm-285,swaplfnl Open Edition 285 Old UnitedKingdom

    Yes

    open_ed-297 EOFR ibm-297,swaplfnl Open Edition 297 Old France Yes

    open_ed-500 EOSW ibm-500,swaplfnl Open Edition 500 OldInternational

    Yes

  • Reference for language elementsVersion 3.3

    22

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    open_ed-1140 EO40 ibm-1140,swaplfnl Open Edition 1140 NorthAmerica

    Yes

    open_ed-1141 EO41 ibm-1141,swaplfnl Open Edition 1141 Austria/Germany

    Yes

    open_ed-1142 EO42 ibm-1142,swaplfnl Open Edition 1142 Denmark/Norway

    Yes

    open_ed-1143 EO43 ibm-1143,swaplfnl Open Edition 1143 Finland/Sweden

    Yes

    open_ed-1144 EO44 ibm-1144,swaplfnl Open Edition 1144 Italy Yes

    open_ed-1145 EO45 ibm-1145,swaplfnl Open Edition 1145 Spain Yes

    open_ed-1146 EO46 ibm-1146,swaplfnl Open Edition 1146 UnitedKingdom

    Yes

    open_ed-1147 EO47 ibm-1147,swaplfnl Open Edition 1147 France Yes

    open_ed-1148 EO48 ibm-1148,swaplfnl Open Edition 1148 International Yes

    open_ed-425 EOA2 ibm-425,swaplfnl Open Edition 425 Arabic Yes

    utf-e UTFE UTF-EBCDIC Unicode Yes

    utf-8 UTF8 utf-8 UTF--8 Unicode Yes

    utf-16be utf-16BE UTF-16 Big Endian Unicode

    utf-16le utf-16LE UTF-16 Little Endian Unicode

    utf-32be utf-32BE UTF-32 Big Endian Unicode

    utf-32le utf-32LE UTF-32 Little Endian Unicode

    ibm-930 J930 ibm-930 Katakana (IBM) Yes

    ibm-933 KIBM ibm-933 Korean (IBM) Yes

    ibm-935 ZIBM ibm-935 Simplified Chinese (IBM) Yes

    ibm-937 YIBM ibm-937 Traditional Chinese (IBM) Yes

    ibm-939 JIBM ibm-939 Japanese (IBM) Yes

    ibm-939e Japanese (IBM-939E) Yes

    ibm-942 JPC ibm-942 Japanese (PCIBM) Yes

    ibm-949 KPC ibm-949 Korean (PCIBM) Yes

    ibm-950 ZPC ibm-950 Traditional Chinese (PCIBM) Yes

  • Reference for language elementsVersion 3.3

    23

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    ibm-1381 YPC Simplified Chinese (PCIBM)

    gb18030 Simplified Chinese (GB18030)

    us-ascii ANSI us-ascii 7-Bit US-ASCII Yes

    latin1 LAT1 iso-8859-1 ISO-8859-1 Western Yes

    latin2 LAT2 iso-8859-2 ISO-8859-2 Central Europe Yes

    latin3 LAT3 iso-8859-3 ISO-8859-3 Southern Europe Yes

    latin4 LAT4 iso-8859-4 ISO-8859-4 Northern Europe Yes

    latin5 LAT5 iso-8859-9 ISO-8859-9 Turkish Yes

    latin6 LAT6 iso-8859-10 ISO-8859-10 Baltic Yes

    latin9 LAT9 iso-8859-15 ISO-8859-15 European Yes

    cyrillic CYRL iso-8859-5 ISO-8859-5 Cyrillic Yes

    arabic ARAB iso-8859-6 ISO-8859-6 Arabic Yes

    greek GREK iso-8859-7 ISO-8859-7 Greek Yes

    hebrew HEBR iso-8859-8 ISO-8859-8 Hebrew Yes

    thai THAI iso-8859-11 ISO-8859-11 Thai Yes

    pcoem437 P437 ibm-437 IBM-4337 USA Yes

    pcoem850 P850 ibm-850 IBM-850 Western Yes

    pcoem852 P852 ibm-852 IBM-852 Central Europe Yes

    pcoem857 P857 ibm-857 IBM-857 Turkish Yes

    pcoem858 P858 ibm-858 IBM-858 European Yes

    pcoem862 P862 ibm-862 IBM-862 Hebrew Yes

    pcoem864 P864 ibm-864 IBM-864 Arabic Yes

    pcoem865 P865 ibm-865 IBM-865 Nordic Yes

    pcoem866 P866 ibm-866 IBM-866 Cyrillic Yes

    pcoem869 P869 ibm-869 IBM-869 Greek Yes

    pcoem874 P874 ibm-874 IBM-874 Thai Yes

    pcoem921 P921 ibm-921 IBM-921 Baltic Yes

    pcoem922 P922 ibm-922 IBM-922 Estonian Yes

    pcoem1129 PVIE ibm-1129 IBM-1129 Vietnamese Yes

  • Reference for language elementsVersion 3.3

    24

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    msdos720 P720 windows-720 Windows OEM 720 Arabic Yes

    msdos737 P737 windows-737 Windows OEM 737 Greek Yes

    msdos775 P775 windows-775 Windows OEM 775 Baltic Yes

    pcoem860 P860 ibm-860 IBM-860 Portuguese (MS-DOS) Yes

    pcoem863 P863 ibm-863 IBM-863 French Canadian Yes

    wlatin2 WLT2 windows-1250 Windows-1250 Central Europe Yes

    wcyrillic WCYL windows-1251 Windows-1251 Cyrillic Yes

    wlatin1 WLT1 windows-1252 Windows-1252 Western Yes

    wgreek WBRK windows-1253 Windows-1253 Greek Yes

    wturkish WTUR windows-1254 Windows-1254 Turkish Yes

    whebrew WHEB windows-1255 Windows-1255 Hebrew Yes

    warabic WARA windows-1256 Windows-1256 Arabic Yes

    wbaltic WBAL windows-1257 Windows-1257 Baltic Yes

    wvietnamese WVIW windows-1258 Windows-1258 Vietnamese Yes

    aroman AROM Apple Roman Yes

    aarabic AARA Apple Arabic Yes

    ahebrew AHEB Apple Hebrew Yes

    agreek AGRK cp1280 Apple cp-1280 Greek Yes

    athai ATHA Apple Thai Yes

    aturkish ATUR cp1281 Apple cp-1281 Turkish Yes

    aukrainian AUKR Apple Ukrainian Yes

    roman8 Roman (HP)

    saslatin1 Western (SAS-Windows)

    saslatin2 Central Europe (SAS-Windows)

    ms-950 ZWIN windows-950 Traditional Chinese (PCMS) Yes

    euc-cn ZEUC euc-cn Simplified Chinese (EUC) Yes

    euc-tw YEUC euc-tw Traditional Chinese (EUC) Yes

    hp15-tw YHPX Traditional Chinese (HP15)

    macos-2 YMAC Traditional Chinese (PCMAC)

  • Reference for language elementsVersion 3.3

    25

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    big5 BIG5 big5 Traditional Chinese (Big5) Yes

    ms-936 YWIN windows-936 Simplified Chinese (PCMS) Yes

    dec-cn ZVMS Simplified Chinese (DEC)

    dec-jp JVMS Japanese (DEC)

    dec-tw YVMS Traditional Chinese (DEC)

    euc-jp JEUC euc-jp Japanese (EUC) Yes

    macos-1 JMAC Japanese (PCMAC)

    macos-3 KMAC Korean (PCMAC)

    macos-25 ZMAC Simplified Chinese (PCMAC)

    ms-932 J932 windows-932 Japanese (PCMS) Yes

    shift-jis SJIS shift_jis Japanese (SJIS) Yes

    euc-kr KEUC euc-kr Korean (EUC) Yes

    ms-949 KWIN windows-949 Korean (PCMS) Yes

    fujitsu-tw YFUJ Traditional Chinese (FACOM)

    fujitsu-cn ZFUJ Simplified Chinese (FACOM)

    fujitsu-jp JFUJ Japanese (FACOM)

    fujitsu-kana Katakana (FACOM)

    fujitsu-ko KFUJ Korean (FACOM)

    hitachi-cn ZHIT Simplified Chinese (HITAC)

    hitachi-jp JHIT Japanese (HITAC)

    hitachi-kana Katakana (HITAC)

    hitachi-ko KHIT Korean (HITAC)

    hitachi-tw YHIT Traditional Chinese (HITAC)

    hitsas-tw YHTS Traditional Chinese (XHITAC)

    hitsas-cn ZHTS Simplified Chinese (XHITAC)

    hitsas-jp JHTS Japanese (XHITAC)

    hitsas-kana Katakana (XHITAC)

    hitsas-ko KHTS Korean (XHITAC)

    nec-jp Japanese (NEC)

  • Reference for language elementsVersion 3.3

    26

    Name ShortName

    Alternative Name Description 'Yes' =Usableas serverencodingon z/OS

    'Yes' =Usableas serverencodingon otherplatforms

    nec-kana Katakana (NEC)

    pcjis Japanese (PCJIS)

    jis-7 Japanese (JIS7)

    ucsu Unicode Compression

    aiceland AICE cp1286 Apple cp-1286 Icelandic Yes

    iso2022jp iso-2022-jp iso-2022-jp

    iso2022kr iso-2022-kr iso-2022-kr

    iso2022cngb iso-2022-cn iso-2022-cn_gb

    sas1047 Western (SAS-EBCDIC)

    iso2022cncns iso-2022-cn-cns iso-2022-cn_cns

    any ANYE Any encoding

    Variable Lists[  _ALL_ |

    _CHARACTER_ |_NUMERIC_ |start-variable-name -- end-variable-name  |start-variable-name -NUMERIC- end-variable-name  |start-variable-name -CHARACTER- end-variable-name  |variable-name : |{  variable-name-numeric-suffix - variable-name-numeric-suffix variable-name  … }

  • Reference for language elementsVersion 3.3

    27

    WPS Core

    Global statementsStatements that can be used anywhere in a SAS language program

    Comment[ * comment-text ; | /* comment-text */ ] 

    CATNAMECATNAME

    [  _ALL_ CLEAR |_ALL_ LIST |name [ CLEAR ]  |name LIST |name ( { element … } )

    ] ;

    elementlibrary . member [ ( ACCESS = READONLY ) ]

    DSNEXSTDSNEXST filename ;

    ENDSASENDSAS ;

  • Reference for language elementsVersion 3.3

    28

    ENDWPSENDWPS ;

    FILENAME Statements

    FILENAMEFILENAME

    [  _ALL_ CLEAR |_ALL_ LIST |name CLEAR |name LIST |name "physical-location" [  access-method  ] [  options...  ]

    ] EXPDT = "value" LABEL = "value" RECFM = "value" RETPD = "value" ;

    On z/OS only, a further ENGINE= option is supported to specify the INFILE/FILE user exit that will beused when accessing the file reference through the INFILE/FILE statements in a datastep.

    FILENAME, DDE Access MethodFILENAME name DDE "DDE-triplet" [ { dde-option … }  ] ;

    dde-option[  HOTLINK |

    NOTAB |COMMAND |LRECL = "n"  |RECFM =

    [  "F" |"N" |"P" |"S370V" |"S370VB" |"S370VBS" |"V" |"D"

    ] ] 

  • Reference for language elementsVersion 3.3

    29

    FILENAME, DDEX Access MethodFILENAME name DDEX "DDEX-triplet" [ { ddex-option … }  ] ;

    ddex-option[  DATE_FORMAT = "EXCEL-FORMAT-STRING"  |

    DATETIME_FORMAT = "EXCEL-FORMAT-STRING"  |FORMAT_CELLS |DLM = "delimiter-character"  |LRECL = "n"  |RECFM =

    [  "F" |"N" |"P" |"S370V" |"S370VB" |"S370VBS" |"V" |"D"

    ]  |TERMSTR = "line-termination-string"  |TIME_FORMAT = "EXCEL-FORMAT-STRING"

    FILENAME, DISK Access MethodFILENAME name DISK

    [  physical-location  |( {  physical-location  … } )

    ] [   |

    BLKSIZE = n  |LRECL = n  |RECFM = format  |MOD |OLD

    ] ;

    FILENAME, EMAIL Access MethodFILENAME name EMAIL [  address  ] [ { email-option … }  ] ;

  • Reference for language elementsVersion 3.3

    30

    email-option[  [ CONTENT_TYPE | CT | TYPE ] = "content-type"  |

    TO = address-list |CC = address-list |BCC = address-list |DELIVERYRECEIPT |ENVELOPE_FROM = address |FROM = address |MIME_WARNING = "mime support warning string"  |READRECEIPT |REPLYTO = address |SUBJECT = "subject"  |X_MAILER = "xmailer string"  |ATTACH =

    [  "filename.ext"  |( "filename.ext" { attachment-option … } )

    ] ] 

    address-list[  ( { address … } ) |

    address] 

    address[  "user@host"  | "Real Name "  ] 

    attachment-option[  [ CONTENT_TYPE | CT | TYPE ] = "content-type"  |

    ENCODING = "encoding"  |[ EXTENSION | EXT ] = "extension"  |NAME = "displayed-name"  |OUTENCODING = "encoding"

    FILENAME, FTP Access MethodFILENAME name FTP remote-file [ { ftp-option … }  ] ;

  • Reference for language elementsVersion 3.3

    31

    ftp-option[  BINARY |

    BLOCKSIZE = blocksize  |CD = "directory"  |DEBUG |DIR |ENCODING = encoding  |FILEEXT |HOST = "hostname"  |HOSTREPONSELEN = length  |LIST |LOWCASE_MEMNAME |LRECL = length  |LS |MGET |NEW |PASS = "password"  |PASV |PORT = port  |RCMD = "command"  |RECFM = recfm  |S370V |S370VS |TERMSTR = "eol-char"  |USER = "user"

    FILENAME, HADOOP Access MethodFILENAME name HADOOP external file [ { hadoop-option … }  ] ;

    hadoop-option[  BUFFERLEN = bufferlen  |

    CFG = file or fileref  |CONCAT |DIR |ENCODING = encoding  |FILEEXT |LRECL = length  |PASS = password  |RECFM = recfm  |USER = "user"

  • Reference for language elementsVersion 3.3

    32

    FILENAME, HTTP Access MethodFILENAME name HTTP url ;

    FILENAME, PIPE Access MethodFILENAME name PIPE command [ { pipe-option … }  ] ;

    pipe-option[  BLOCKSIZE = blocksize  |

    BLKSIZE = blocksize  |LRECL = length  |RECFM = recfm  |CONSOLE = [ MAX | MIN | NORMAL ] 

    FILENAME, SOCKET Access MethodFILENAME name SOCKET hostname:portno [ { socket-option … }  ] ;

    socket-option[  BLOCKSIZE = blocksize  |

    ENCODING = encoding  |LRECL = length  |RECFM = recfm  |RECONN = server-connection-limit  |SERVER |TERMSTR = "eol-char"  |USER = "user"

    FILENAME, SYSOUT Access MethodFILENAME name SYSOUT [ = class  ] [ option ] ;

    option[  ALIGN |

  • Reference for language elementsVersion 3.3

    33

    BURST |CHAR1 = table-name  |CHAR2 = table-name  |CHAR3 = table-name  |CHAR4 = table-name  |CLOSE |COPIES = n  |DEST = node  |FCB = fcb-name  |FLASH = overlay-name  |FLASHC = copies  |FOLD |FORMS = form-name  |HOLD |ID = userid  |MODIFY = module-name  |MODIFYT = table-reference-character  |OUTLIM = limit  |PGM = writer-name  |UCS = character-set-code  |UCSVER |VERIFY

    FILENAME, URL Access MethodFILENAME name URL url [ { url-option … }  ] ;

    url-option[  BLOCKSIZE = blocksize  |

    DEBUG |ENCODING = encoding  |LRECL = length  |PASS = "password"  |PPASS = "password"  |PROXY = "url"  |PUSER = "username"  |RECFM = recfm  |TERMSTR = "eol-char"  |USER = "user"

  • Reference for language elementsVersion 3.3

    34

    FILENAME, z/OS Datasets Access MethodFILENAME name dataset-name [ option ] ;

    option[  BLKSIZE = nnnnn  |

    BUFNO = n  |DATACLASS = data-class  |DISP =

    [  status  |( status

    [  , [  normal-disp  ] [ , [  abnormal-disp  ]  ]] )

    ]  |DSORG = organisation  |DSNTYPE = type  |EXPDT = [  yyddd  | yyyy/ddd  ]  |LABEL= ( label-subparameters ) |LIKE = data-set-name  |LRECL = nnnnn  |MGMTCLAS = "management-class"  |NOMOUNT |OPTCD = value  |RECFM = value  |RECORG = organisation  |RETPD = days  |REUSE |SPACE = ( [ TRK | CYL | blksize  ] ,

    [  primary-space  |( primary-space

    [  , secondary-space [ , directory-blocks  ]] )

    ] ) |STORCLAS = "storage-class"  |VOLCOUNT = count  |VOLSEQ = seqno  |VOLSER =

    [  volser  |( {  volser ,  … } )

    ]  |WAIT = n

  • Reference for language elementsVersion 3.3

    35

    FOOTNOTEFOOTNOTEn

    [  {  { graphing-options … } [  footnote-text  | "footnote-text"  ]  … }] ;

    graphing-options[  ANGLE = [ 90 | -90 ]  |

    COLOR = footnote-color  |FONT = footnote-font  |HEIGHT = n [ units ]  |JUSTIFY = [ CENTER | LEFT | RIGHT ] 

    units[ CELLS | CM | IN | PCT | PT ] 

    %INCLUDE[ %INCLUDE | %INC ] external-file i

    [  /{  S2 = n  |

    S2 = S |[ SOURCE2 | NOSOURCE2 ] 

    … } ] ;

    i See External Files.

    LIBNAMELIBNAME

    [  _ALL_ CLEAR |name CLEAR |_ALL_ LIST |name LIST |name [  engine-name  ] [  physical-location  ] [ {  engine-option  … }  ]

    ] ;

  • Reference for language elementsVersion 3.3

    36

    MISSING{  character  … } ;

    ODS StatementsThe ODS (Output Delivery System) routes the contents of program output to the sources described inthis section, including HTML and PDF.

    ODSThe generic structure of an ODS global statement is shown below. Subsequent sections detail the use ofthe ODS system for specific destinations.

    ODS [  destination  ] generic_options markup_options destination_specific_options ;

    generic options{   |

    CLOSE |SHOW |[ SELECT | EXCLUDE ] 

    [  { output_object … } [ PERSIST ]  |ALL |NONE

    ] … } 

    output object[  full-path  |

    . remainder-of-full-path  |" label " |" label-path " |" . remainder-of-label-path " |label-and-path-mixture  |output_object # n

  • Reference for language elementsVersion 3.3

    37

    ODS MARKUPBelow is a generic list of markup options supported by ODS. Each destination accepts a subset of theseoptions as specified in the corresponding sections.

    ODS MARKUP TAGSET = tagset-name [ ( [ ID = ] identifier ) ] generic_options markup_options ;

    markup options{   |

    ANCHOR = anchor-string  |BASE = url-string  |[ BODY | FILE ] = file-location [ location_options ]  |CHARSET = charset-id  |CODE = code-location [ location_options ]  |CONTENTS = contents-location [ location_options ]  |CSSSTYLE = location [ ( {  media-type  … } ) ]  |ENCODING = encoding-name  |FRAME = frame-location [ location_options ]  |GPATH = path  |HEADTEXT = header-text-string  |METATEXT = meta-text-string  |PATH = path  |[ RECORD_SEPARATOR | RECSEP | RS ] = record-separator-string  |STYLE = style-name  |STYLESHEET = stylesheet-location [ location_options ]  |TRANTAB = id-string

    … } 

    location options(

    {  URL = url-string  |DYNAMIC |NO_BOTTOM_MATTER |NO_TOP_MATTER |TITLE = title-string

    … } )

    The following statements are aliases of ODS MARKUP. They are described in the correspondingsections in further detail.

    ODS CHTML is an alias of ODS MARKUP TAGSET= tagsets.chtmlODS CSV is an alias of ODS MARKUP TAGSET= tagsets.csvODS CSVALL is an alias of ODS MARKUP TAGSET= tagsets.csvallODS EXCELXP is an alias of ODS MARKUP TAGSET= tagsets.excelxp

  • Reference for language elementsVersion 3.3

    38

    ODS HTML is an alias of ODS MARKUP TAGSET= tagsets.htmlcssODS HTMLCSS is an alias of ODS MARKUP TAGSET= tagsets.htmlcssODS HTML4 is an alias of ODS MARKUP TAGSET= tagsets.html4ODS MSOFFICE2K is an alias of ODS MARKUP TAGSET= tagsets.msoffice2kODS PHTML is an alias of ODS MARKUP TAGSET= tagsets.phtmlODS XML is an alias of ODS MARKUP TAGSET= tagsets.xml

    ODS CHTMLODS [ CHTML | MARKUP TAGSET = tagsets.chtml  ] generic_options markup_options ;

    The following markup options are supported (see section ODS MARKUP):

    • ANCHOR• BODY• CHARSET• CONTENTS• ENCODING• FILE• FRAME• GPATH• PAGE• PATH• RECORD_SEPARATOR• TRANTAB

    ODS CSVODS [ CSV | MARKUP TAGSET = tagsets.csv  ] generic_options markup_options CSV_options ;

  • Reference for language elementsVersion 3.3

    39

    CSV options[  OPTIONS = (

    {  BYLINES = boolean  |DELIMITER = character  |PROCTITLES = boolean  |TITLES = boolean

    … } )]

    The following markup options are supported (see section ODS MARKUP):

    • BODY• CHARSET• ENCODING• FILE• GPATH• PATH• RECORD_SEPARATOR• TRANTAB

    ODS CSVALLODS [ CSVALL | MARKUP TAGSET = tagsets.csvall  ] generic_options markup_options ;

    The following markup options are supported (see section ODS MARKUP):

    • BODY• CHARSET• ENCODING• FILE• GPATH• PATH• RECORD_SEPARATOR• TRANTAB

    ODS EXCELXPODS [ EXCELXP | MARKUP TAGSET = tagsets.excelxp  ] generic_options mark-up_options

    EXCELXP_options ;

  • Reference for language elementsVersion 3.3

    40

    EXCELXP options[  OPTIONS = (

    {  AUTOFILTER =[  all |

    none |boolean  |column-range

    ]  |AUTOFILTER_TABLE = table-index  |ABSOLUTE_COLUMN_WIDTH = numeric-list  |AUTOFIT_HEIGHT = boolean  |CONTENTS = boolean  |CURRENCY_SYMBOL = character  |CURRENCY_FORMAT = currency-format  |DECIMAL_SEPARATOR = character  |DEFAULT_COLUMN_WIDTH = numeric-list  |EMBEDDED_FOOTNOTES = boolean  |EMBEDDED_TITLES = boolean  |FORMULAS = boolean  |FROZEN_HEADERS = [  boolean  | number  ]  |FROZEN_ROWHEADERS = [  boolean  | number  ]  |ORIENTATION = [ PORTRAIT | LANDSCAPE ]  |PRINT_FOOTER = boolean  |PRINT_FOOTER_MARGIN = number  |PRINT_HEADER = boolean  |PRINT_HEADER_MARGIN = number  |SHEET_INTERVAL =

    [  BYGROUP |PAGE |PROC |TABLE |NONE

    ]  |SHEET_LABEL = string  |SUPPRESS_BYLINES = boolean  |THOUSANDS_SEPARATOR = character  |WIDTH_FUDGE = number  |WIDTH_POINTS = number  |ZOOM = number

    … } )]

    The following markup options are supported (see section ODS MARKUP):

    • BODY• CHARSET

  • Reference for language elementsVersion 3.3

    41

    • CONTENTS• ENCODING• FILE• GPATH• PAGE• PATH• RECORD_SEPARATOR• STYLE• STYLESHEET• TRANTAB

    ODS HTMLThe destination HTML is an alias for HTMLCSS, see section ODS HTMLCSS.

    ODS HTMLCSSODS [ HTMLCSS | MARKUP TAGSET = tagsets.htmlcss  ] generic_options markup_options

    HTMLCSS_options ;

    HTMLCSS options[  OPTIONS = ( BITMAP_MODE =

    [  "IMG" |"INLINE" |"EMBED" |"OBJECT"

    ] )]

    The following markup options are supported (see section ODS MARKUP):

    • ANCHOR• BODY• CHARSET• CONTENTS• CSSSTYLE• ENCODING• FILE

  • Reference for language elementsVersion 3.3

    42

    • FRAME• GPATH• HEADTEXT• METATEXT• PAGE• PATH• RECORD_SEPARATOR• STYLE• STYLESHEET• TRANTAB

    ODS HTML4ODS [ HTML4 | MARKUP TAGSET = tagsets.html4  ] generic_options markup_options ;

    The following markup options are supported (see section ODS MARKUP):

    • BODY• CHARSET• ENCODING• FILE• GPATH• PATH• RECORD_SEPARATOR• TRANTAB

    ODS LISTINGODS LISTING generic_options LISTING_options ;

    LISTING options[ FILE = file-location  ]

    ODS MSOFFICE2KODS [ MSOFFICE2K | MARKUP TAGSET = tagsets.msoffice2k  ] generic_options markup_options ;

  • Reference for language elementsVersion 3.3

    43

    The following markup options are supported (see section ODS MARKUP):

    • ANCHOR• BODY• CHARSET• CONTENTS• CSSSTYLE• ENCODING• FILE• FRAME• GPATH• HEADTEXT• METATEXT• PAGE• PATH• RECORD_SEPARATOR• STYLE• STYLESHEET• TRANTAB

    ODS OLDHTMLODS OLDHTML generic_options OLDHTML_options ;

    OLDHTML options{   |

    [ BODY | FILE ] = body-location [ location-options ]  |CSS = [ " external-file " | fileref  ]  |GFOOTNOTE = " Graphics footnote text " |GPATH = " graphics output location " |GTITLE = " Graphics title text " |CONTENTS = contents-location  |FRAME = frame-location [ location-options ]  |PAGE = page-location [ location-options ]  |PATH = path

    … } 

  • Reference for language elementsVersion 3.3

    44

    location-options(

    {  URL = " URL string " |DYNAMIC |NO_BOTTOM_MATTER |NO_TOP_MATTER |TITLE = " Title string "

    … } )

    ODS PDFODS PDF generic_options PDF_options ;

    PDF options{   |

    FILE = [ " pdf-file " | fileref  ]  |COLUMNS = n  |OUTPUTBY = [ PAGE | TABLE ]  |STARTPAGE = [ NO | YES ]  |STYLE = style-name

    … } 

    ODS PDF Options

    The following system options allow you to determine how PDFs are output via the ODS:

    • PAPER SIZE• ORIENTATION• TOPMARGIN• BOTTOMMARGIN• LEFTMARGIN• RIGHTMARGIN

    Note:Negative values are not allowed.

  • Reference for language elementsVersion 3.3

    45

    PAPER SIZE

    This option sets the paper size of the PDFs output via the ODS.

    PAPERSIZE =[  A2 |

    A3 |A4 |A5 |LETTER |USLETTER

    Valid in: ODS PDF: in configuration file, Options statement and/orcommand line

    Default: The paper size associated with the Locale.

    ORIENTATION

    This option sets the orientation (PORTRAIT or LANDSCAPE) of the PDFs output via the ODS.

    ORIENTATION = [ PORTRAIT | LANDSCAPE ] 

    Valid in: ODS PDF: in configuration file, Options statement and/orcommand line

    Default: PORTRAIT

    TOPMARGIN

    This option sets the top margin of the of the PDFs output via the ODS.

    TOPMARGIN = n.n [  | cm | in | pt ] 

    Valid in: ODS PDF: in configuration file, Options statement and/orcommand line

    Default: Zero inches

    BOTTOMMARGIN

    This option sets the bottom margin of the of the PDFs output via the ODS.

    BOTTOMMARGIN = n.n [  | cm | in | pt ] 

  • Reference for language elementsVersion 3.3

    46

    Valid in: ODS PDF: in configuration file, Options statement and/orcommand line

    Default: Zero inches

    LEFTMARGIN

    This option sets the left margin of the of the PDFs output via the ODS.

    LEFTMARGIN = n.n [  | cm | in | pt ] 

    Valid in: ODS PDF: in configuration file, Options statement and/orcommand line

    Default: Zero inches

    RIGHTMARGIN

    This option sets the right margin of the of the PDFs output via the ODS.

    RIGHTMARGIN = n.n [  | cm | in | pt ] 

    Valid in: ODS PDF: in configuration file, Options statement and/orcommand line

    Default: Zero inches

    ODS PHTMLODS [ PHTML | MARKUP TAGSET = tagsets.phtml  ] generic_options markup_options ;

    The following markup options are supported (see section ODS MARKUP):

    • BODY• CHARSET• ENCODING• FILE• GPATH• HEADTEXT• METATEXT• PATH• RECORD_SEPARATOR

  • Reference for language elementsVersion 3.3

    47

    • STYLE• TRANTAB

    ODS XMLODS [ XML | MARKUP TAGSET = tagsets.xml  ] generic_options markup_options ;

    The following markup options are supported (see section ODS MARKUP):

    • BODY• CHARSET• CONTENTS• ENCODING• FILE• GPATH• PATH• RECORD_SEPARATOR• TRANTAB

    ODS _ALL_ CLOSEODS _ALL_ CLOSE ;

    ODS PROCLABELODS PROCLABEL " label ";

    ODS PROCTITLEODS [ PROCTITLE | NOPROCTITLE ] ;

  • Reference for language elementsVersion 3.3

    48

    ODS OUTPUTODS OUTPUT

    [  CLEAR |CLOSE |SHOW |{ options … }

    ] ;

    optionsoutput-object

    [  ({  PERSIST = [  proc  | run  ]  |

    MATCH_ALL [ = macrovarname  ]… } )[ # n  ]

    ] [ = WPS-Data-set-name  ]

    output-object[  full-path  |

    . remainder-of-full-path  |" label " |" label-path " |" . remainder-of-label-path " |label-and-path-mixture

    ODS TRACEODS TRACE [ ON | OFF ] [ / [ LABEL | LISTING ]  ] ;

    OPTIONSOPTIONS {  option  … } ;

    PAGEPAGE ;

  • Reference for language elementsVersion 3.3

    49

    RUNRUN [ CANCEL ] ;

    SKIPSKIP [  n  ] ;

    SYSTASK Statements

    SYSTASK COMMANDSYSTASK COMMAND "operating system command" [ { option … }  ] ;

    option[  WAIT |

    NOWAIT |TASKNAME = name  |MNAME = var-namem  |STATUS = var-name  |SHELL [ = "shell-path"  ]  |CLEANUP

    SYSTASK LISTSYSTASK LIST [ _ALL_ | task-name  ] [ STATE ] [ STATVAR ] ;

    SYSTASK KILLSYSTASK KILL {  task-name  … } ;

  • Reference for language elementsVersion 3.3

    50

    TITLETITLEn

    [  {  { graphing-options … } [  title-text  | "title-text"  ]  … }] ;

    graphing-options[  ANGLE = [ 90 | -90 ]  |

    COLOR = title-color  |FONT = title-font  |HEIGHT = n [ units ]  |JUSTIFY = [ CENTER | LEFT | RIGHT ] 

    units[ CELLS | CM | IN | PCT | PT ] 

    WAITFORWAITFOR [  | _ANY_ | _ALL_ ]  { [  remote-id  | task-name  ]  … } [ TIMEOUT = seconds  ] ;

    The WAITFOR _ALL_ statement suspends execution of the current session until proc