Message Boards
Is there a number range include file?
Joseph Betts, modified 3 Years ago.
Is there a number range include file?
Post Date: 8/27/20 (Bronze, 20 Posts) Recent PostsHello Team,
I am writing a custom program and I would like the program to use a number range sequence.
Is there a QAD include file which returns next sequence ID, and increments the number range?
Kindest Regards,
Joseph
William Wulmsen, modified 5 Years ago.
Re: Is there a number range include file?
Post Date: 9/22/20 (Bronze, 2 Posts) Recent PostsHello 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
Joseph Betts, modified 5 Years ago.
Re: Is there a number range include file?
Post Date: 9/22/20 (Bronze, 20 Posts) Recent PostsThanks for your reply @William,
I will follow the same technique in my custom code.
Kindest Regards,
Joseph
Message place holder
Forums