Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Cases and Case Data : Extracting Case Data (Extended)

Extracting Case Data (Extended)
If you want to specify the output format of the case data, use the following command:
swutil EXTCD [flagsprocname [casenum [fields]]
where:
flags indicates one or more of the following optional parameters, preceded by a hyphen character (-), which can appear anywhere on the command line.
-v  verbose
-a  abox
-c  comma delimited
-t  tab delimited
-tchar  delimited by character char
-u  UNIX: LF
-d
  DOS: CR + LF
Causes a list of field names to be included as the first line of the output. It only applies if the -c, -t or -tchar format options are specified. The field names are written in upper-case letters, separated as specified by the format flag.
Examples of flag options:

 
-vu
-a -d
-dt~
-t

 
procname is the name of the procedure (case insensitive).
casenum is optional, and specifies the number of the case to be extracted, or one of the following may be used:
If this parameter is not specified, the default is ALL_CASES.
fields is optional (but requires that casenum is included), and provides a list of fields to be extracted, separated by commas, for example:

 
FIELD1,FIELD2,FIELD3

 
(Field names are case insensitive.)
As well as fields defined in the procedure, the following predefined fields may be included:
Alternatively, ALL_FIELDS may be used to specify that all fields of the procedure should be extracted (including SW_CASENUM, and SW_CASEDESC if it is used as a marked field). This is the default if the parameter is omitted.
Output Formats
Verbose: -v
This gives the same output as swutil EXTCD without any extra parameters. See Extracting Case Data (Interactive).
abox: -a
This is formatted one field per line, each line consisting of the field name, followed by a comma, followed by the field data.
Cases are written out in numeric order; the order of fields is as specified on the command line. There is no break between different cases.
Examples of output:

 
SW_CASENUM,1
AFIELD,Here's a text value
DATE,23/03/1999
SW_CASENUM,2
AFIELD,Here's a name: "Peter"
DATE,24/03/1999

 
Comma delimited: -c
This is formatted one case per line, with each field value separated from the next by a comma.
Field names are written out on the first line if the -f flag is included. Cases are written out in numeric order; the order of fields is as specified on the command line.
If the field contains a comma as part of its value, the entire field contents is enclosed in double quotes; if a field contains double quotes, each double quotes character is represented by two double quotes characters, "".
Examples of output for -cf:

 
SW_CASENUM,AFIELD,DATE
1,Here's a text value,23/03/1999
2,Here's a name: ""Peter"",24/03/1999

 
Tab (or other character) delimited: -t
This works the same as the comma-delimited format, except:

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved