Previous Topic

Next Topic

Book Contents

Book Index

Examples

For the examples below, four Local variables and four generations of a Database variable were created in the order listed:

Table 194 Values for NEXTVAR Function Examples

Variable

Run ID

TOTALD40

 

TOTALA20

 

TOTALZ18

 

TOTALC18

 

DB_DEMO.CHKDBL@G2

1

DB_DEMO.CHKDBL@G1

2

DB_DEMO.CHKDBL@G0

1

DB_DEMO.CHKDBL (not yet committed)

2

Table 195 NEXTVAR Function Examples

Function

Returns values

NEXTVAR('TOTAL*')

'TOTALA20'

NEXTVAR('TOTAL*','TOTALA20')

'TOTALC18'

NEXTVAR('TOTAL*','TOTALC18')

'TOTALD40'

NEXTVAR('TOTAL*','TOTALD40')

'TOTALZ18'

NEXTVAR('TOTAL*','TOTALZ18')

'   '

DO SET CURRENT=NEXTVAR('TOTAL*',' ')

'TOTALA20'

DO SET CURRENT=NEXTVAR('TOTAL*',CURRENT)

'TOTALC18'

NEXTVAR('DB_CHKDBL',' ')

'DB_CHKDBL'

NEXTVAR('DB_CHKDBL','DB_CHKDBL')

'DB_CHKDBL@G0'

NEXTVAR('DB_CHKDBL','DB_CHKDBL@G0')

'DB_CHKDBL@G1'

NEXTVAR('DB_CHKDBL','DB_CHKDBL@G1')

'DB_CHKDBL@G2'

NEXTVAR('DB_CHKDBL@R1','DB_CHKDBL')

'DB_CHKDBL@G0'

NEXTVAR('DB_CHKDBL@R1','DB_CHKDBL@G0')

'DB_CHKDBL@G2'

Parent Topic

NEXTVAR: Functions