NEXT

The NEXT command reads the next streaming event.

Each event will return a status code to identify the type of event received.

When all events have been received a status code of NONEXT is returned to idenitify the end of the stream.

All events do not need to be read before closing the stream reader.

Element attribute names and values can be accessed by using a two field working list argument. The working list is cleared and attributes are added when a ELEMENTSTART event is received.

Possible status and message values

Status

Message

NONEXT

 

ELEMENTSTART

Qualified element name.
For example: {http://www.cars.com/xml}part

ELEMENTEND

Qualified element name.
For example: {http://www.cars.com/xml}part

COMMENT

Comment text.

INSTRUCTION

Processing Instruction.

 

 

 

                                                        Required

 

 NEXT

 

                                                        Optional

 

        >-- COMMENT ---------- *NO ---------------------------->

                               *YES

 

        >-- INSTRUCTIOM ------ *NO ----------------------------|

                               *YES

 

Keywords

COMMENT

This optional keyword is used to include comment events.

The possible values for the COMMENT keyword are:

  • *NO
  • *YES

The default value is *NO.

INSTRUCTION

This optional keyword is used to include processing instruction events.

The possible values for the INSTRUCTION keyword are:

  • *NO
  • *YES

The default value is *NO.

Examples

RDML

 

USE BUILTIN(JSM_COMMAND) WITH_ARGS('NEXT SERVICE_LIST(ATRNAME,ATRVALUE)') TO_GET(#JSMSTS #JSMMSG #WRKLST)

 

RDMLX

 

use builtin(jsmx_command) with_args(#jsmxhdle1 'next') to_get(#jsmxsts #jsmxmsg #wrklst)