Highlighted
Absent Member.
Absent Member.
480 views

interesting correlation problem

I have following problem with correlation

in my script

I have total of 6 types of value

type1 has maybe 6 more data like

type1 as some no
it has 234, 5678, 890241,35678, 1234, 456

there is one type of data which has more than 200 different values.

same thing for all other types. some no or strings. they are shows up in as follows from the server

138510
22243

all the values for all the types shows up this way - two time in a one line.

I can't get the whole type of data as each time those character/no will be different. I mean i can't user offset, length etc.
see below for example

LB
type 1 data - total of six line
RB

how can I correlate them. I need all of these values.

0 Likes
11 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: interesting correlation problem

You can use the "ORD=ALL" option to save all the values.

But, if you already know how that works then can you explain it a bit more clearly so that Ic an help you?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: interesting correlation problem

my bad that I am not explaining the problem well.

for example

below is the one value - two time for type 1 shows up in the source from the server

this values changes for each user.

138510

here I need 138510. boundaries

LB =
ORD = ALL

but this will give me all the values. but I have total of six types and each has its own set up of values in variable counts.

for example

usr1

type 1 -3
type 2 - 200
type 3 - 8

etc etc

usr2

type 1 - 40
type 2 - 34
type 3 9

etc etc

and all has the same boundaries. how I am going to dissect ??
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: interesting correlation problem

Hi

We had faced the same problem , that the position of the value was changing with every user.

but then we found a patten on how it was changing , and coded it accordingly.

If you figure out a pattern , I can tell you how we coded it .

Regards
Sanjay
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: interesting correlation problem

I did find out the pattern

so here it is

first we got all the values including not needed

for example

type 1 has 2 values that are needed 138510 and 22243 but I got whole string as follows


138510
22243

now I need the 2 values 138510 and 22243

I am working on strtok
the issue here is array manipulation. which I am not familiar with very well

also after getting all the values I need to create web custom request to get pass the request.

tell me how I can get it with your example
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: interesting correlation problem

Seems a bit interesting :).

Are all the values of all types being returned as part of the same response?
Meaning,

when you send a "web_Url or Web_submit" request, do you find the the values for all the 6 types being returned as part of the same response?

If your answer to the above question is NO, then you can use "ORD=ALL" and capture the values for each type using a different web_reg_save_param before the request returning them.

If your answer to the above question is "YES" then, the pattern you have will not solve the problem, as we need to find a unique pattern.
May be I can help you if I can get to see the response/replay log for that particular request.

Let me know if that is possible.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: interesting correlation problem

Sorry, if I misunderstood earlier, but, are you able to save the 6 types of values seperately with the pattern you identified.

I am no expert, but have some experience in using strtok and saving them to an array.

Let me know if I can help.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: interesting correlation problem

Hi

attached are two files
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: interesting correlation problem

sorry

above is the request

here is the response
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: interesting correlation problem

So, from what I see, the response has only contained the "lstlockbox" values. So, you should be able to correlate each variable separately and store them, then you can use the "strtok" function and save them in an array before you create a "web_custom_request" using them.

I will post the code here soon.

Regards.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: interesting correlation problem

all right men

I am here right now

first strtok is fine
working on second token.

token1[i] = (char *)strtok(lr_eval_string("{Lockbox}"),sep1);

lr_output_message("The token is :%s",token1[i]);

if(!token1[i]) {

lr_output_message("No tokens found in string!");
return( -1 );
}

while( token1[i] != NULL ) { /* While valid tokens are returned */

lr_output_message( " the value is %s", token1[i] );//getting 22243
token1[i] = (char *)strtok(NULL, sep1); /* Get the next token */

-------------------------------------------------------------------------

token2[j] = (char *)strtok(token1[i],sep2);

lr_output_message("The token is :%s",token2[j]);

if(!token2[j]) {

lr_output_message("No tokens found in string!");
return( -1 );
}

while( token2[j] != NULL ) { /* While valid tokens are returned */

lr_output_message( " the value is %s", token2[j] );
token2[j] = (char *)strtok(NULL, sep2); /* Get the next token */

}
j=j+1;
} //token 1 while loop
i = i+1;
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: interesting correlation problem

Naga,

I thought you are putting solution here
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.