Highlighted
Absent Member.
Absent Member.
3630 views

Vugen action.c Too many local variables

Hi folks,

I have recorded a script (MSSSQL) , but when compiling, i am getting a error as

Action.c Too many local variables

The line hi lighted is a cursor statement, but the exact cursor block is called some where in above code. For that block there is no error

lrd_stmt(Csr4, "rsp_XYZ\r\n\t", -1, 0, 0 /*None*/, 0);
lrd_stmt(Csr4, "9.0000000000", -1, 0, 0 /*None*/, 0);

//Error Line Starts
lrd_stmt(Csr4, ",\r\n\t", -1, 0, 0 /*None*/, 0);
//Error Line Ends
lrd_stmt(Csr4, "NULL", -1, 0, 0 /*None*/, 0);
lrd_stmt(Csr4, ",\r\n\t", -1, 0, 0 /*None*/, 0);
lrd_stmt(Csr4, "NULL", -1, 0, 0 /*None*/, 0);
lrd_stmt(Csr4, ",\r\n\t", -1, 0, 0 /*None*/, 0);
lrd_stmt(Csr4, "222.0000000000", -1, 0, 0 /*None*/, 0);
lrd_stmt(Csr4, ",\r\n\t", -1, 0, 0 /*None*/, 0);

lrd_stmt(Csr4, "0", -1, 0, 0 /*None*/, 0);

I am unable to find anything on internet except this link http://www.wilsonmar.com/1lrscript.htm

Please help
0 Likes
5 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Vugen action.c Too many local variables

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Vugen action.c Too many local variables

Unable to access the page you requested is presented to me.

Can you please post whats on the page?
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Vugen action.c Too many local variables


Knowledge document information



Title:
Error: "Too many local variables"
Document ID:
KM171796
Product:
LoadRunner
Version:

OS:
Unspecified
Updated:
2002-Mar-04
Summary:
Threshold for local variable


The error message, "Too many local variables" appears when running script.


Solution


1. VuGen has a limitation of 64K for local variables. If you want to declare a variable larger than 64K,
a. Declare it globally.
Example:
char buffer[100000];
Actions()
{
return 0;
}
b. Use malloc() to allocate the memory.
Example:
Actions()
{
char *buffer = (char *) malloc(100000);
/*Remember to free it when you do not need it*/
free(buffer);
return 0;
}

2. If you have this problem replaying a large database script in LoadRunner 7.8 or above, immediately after recording,
a. Go to Tools -> Regenerate Vusers...
b. Click on 'Options...' to edit the recording options
c. Under General:
1. Script section, enable the option for "Split action section to functions by event".
By default, this is not enabled and it has a value of "500". This option is useful for when the action section is rather large
2. Script and select "Maximum number of lines in action file", change the value to 30000 and regenerate again

Highlighted
Absent Member.
Absent Member.

Re: Vugen action.c Too many local variables

I dont have option as "Regenerate Vusers" but have "Regenerate Script"
In this option "Split action section to functions by even" is not present but "Maximum number of lines in action file", change the value to 30000 and regenerate again

is present. I did change the value to 30000 and regenerated again. Two actions were created but still compile failed

LR Version:9.50
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Vugen action.c Too many local variables

Thanks, splitting the file at 10000 worked.

Cheers
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.