READ

LANSA Integrator

READ

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

 

                                                         Required

 READ

 

                                                         Optional

 

              >-- SHEET ----------- value ---------------------->

 

              >-- R1C1 ------------ n,n ------------------------>

 

              >-- ROWCOUNT -------- value ---------------------->

 

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

                                   *EMPTY

 

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

 

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

                                   *DEFAULT

                                   *CLIENT

                                   *USERAGENT

                                   value

 

Keywords

SHEET

A specific sheet name can be entered otherwise the current context sheet is used.

R1C1

The starting row and column defaults to 1, 1. This indicates the starting position for rows and columns reading.

ROWCOUNT

Specify the number of rows to read. If no ROWCOUNT keyword is used all rows to the end of the sheet are read.

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) 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)') to_get(#jsmsts #jsmmsg #ordlist)