Views Reply Votes
Joseph Betts
Joseph
 10
Is there a number range include file?
29
2
00
Posted: Aug 27, 2020   
Votes
William Wulmsen
William
 7
Replied 

Hello Joseph,

You define the nummerrange in 36.2.21 nrsqmt.p.

You have to create the include yourself. But I have embedded them in a procedure lib that I call.

I use this piece of coding:

Define your variables:

l_seqid as Character /*  the name of the sequence */
l_nbr as character /* the output */
l_error as logical
l_errnum as integer /* the error code. */

        {gprun.i ""gpnrmgv.p""
                     "(INPUT l_seqid,
                       INPUT-OUTPUT l_nbr,
                       OUTPUT l_err,
                       OUTPUT l_errnum)"}

If necesary you have to check the availability of the number with the related table.

With this routine the user and sequence are stored in the related sequence history.

Reg
William

10
Replied: Sep 23, 2020
Votes
Joseph Betts
Joseph
 10
Replied 

Thanks for your reply @William,

I will follow the same technique in my custom code.

Kindest Regards,
Joseph

00
Replied: Sep 23, 2020
Forums
All
Forum Help
Help Using Forums