READ

LANSA Integrator

READ

The READ command is used to read a range of cells from the nominated worksheet on the currently open document into a working list. Each cell value has trailing blanks trimmed.

The READ command must be preceded by an OPEN command with read mode.

 

 READ ----------- SHEET ----------- sheet1 ---------------------->

                                    value

 

              >-- R1C1 ------------ 1,1 ------------------------->

                                    n,n

 

              >-- R2C2 ------------ 0,0 ------------------------->

                                    n,n

 

              >-- IGNORE --------- *NONE ------------------------>

                                   *EMPTY

 

              >-- SCALE ---------- value ------------------------>

 

              >-- NUMBERFORMAT --- *NONE ------------------------|

                                   *DEFAULT

                                   *CLIENT

                                   *USERAGENT

                                   value

 

Keywords

SHEET

A specific sheet name can be entered or the default value of sheet1 will be used.

R1C1

Enter a specific row and column to be read. If a value is not specified the default 1,1 is used.

R2C2

The R2C2 keyword value can have a row and column value of 0.

Enter a specific end row and column for read processing. If a value is not specified the default 0,0 is used which indicates to read to the end of the sheet.

Note: Currently the column value of the R2C2 keyword is ignored and should have a value of 0 or not specified.

IGNORE

The default value of *NONE indicates that all entries should be processed. The alternative option *EMPTY indicates that empty entries should be ignored.

An empty entry is where all cell values that make a list entry have an empty string value.

SCALE

This optional keyword specifies the decimal scale that will be used on numeric cells that have a general number format. The default value is 4.

NUMBERFORMAT

This optional keyword handles numeric strings where the decimal separator is not the decimal point character ".".

Refer to NUMBERFORMAT for more information.

Examples

RDML

 

USE BUILTIN(JSM_COMMAND) WITH_ARGS('READ SHEET(PARTS) SERVICE_LIST(LINENUM,PARTNUM,PARTDSC,PARTAMT,PARTQTY)') TO_GET(#JSMSTS #JSMMSG #ORDLIST)

 

or

 

USE BUILTIN(JSM_COMMAND) WITH_ARGS('READ SHEET(PARTS) R1C1(10,3) R2C2(20,0) SERVICE_LIST(LINENUM,PARTNUM,PARTDSC,PARTAMT,PARTQTY)') TO_GET(#JSMSTS #JSMMSG #ORDLIST)

 

RDMLX

 

use builtin(jsmx_command) with_args(#jsmhandle 'read sheet(parts)') to_get(#jsmsts #jsmmsg #ordlist)

 

or

 

use builtin(jsmx_command) with_args(#jsmhandle 'read sheet(parts) r1c1(10,3) R2C2(20,0)') to_get(#jsmsts #jsmmsg #ordlist)