M@SYSVAR

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
appbuilder
Posts: 28
Joined: Sat Jan 16, 2016 9:53 am

M@SYSVAR

Post by appbuilder »

Does anyone know where the *AUTONUM value are stored. They are processed through the M@SYSVAR 3GL program, but I can't determine where the data is actually stored. I'd like to get at it from a stored procedure.
Thanks,

Don
René Houba
Posts: 220
Joined: Thu Nov 26, 2015 7:03 am

Re: M@SYSVAR

Post by René Houba »

Hi appbuilder,

The autonums are special system variables. Data is coming from iSeries data areas or in Windows the internal LX_DTA table.

Programs that handle these are M@SYSDTA and M@SYSNUM (and not M@SYSVAR as you mentioned in the Subject name ;) ....)

Examples:

1.
*AUTONUMnnxxxxxxxxxx
where xxxxxxxxxx = your unique name

Gets & increments numeric value of length nn from (emulated) data area xxxxxxxxxx.
Can be used to hold last employee or customer number allocated.

2.
*AUTOALPnnxxxxxxxxxx
Gets & increments alphanumeric value of length nn from (emulated) data area xxxxxxxxxx.

3.
*DTAssslllxxxxxxxxxx
Gets data at position sss of length lll from (emulated) data area xxxxxxxxxx.

Kind regards,
René
Post Reply