dhowells
21st July 2005, 21:11
I am attempting to create some code to compare if two records are the same using the rcd table variables. The table has a length of 378 and the internal variable rcd.ttable . The variable continues to come up with a length of 85 for all tables. Using the alloc.mem function terminates the entire login.
evesely
25th July 2005, 15:32
Perhaps you can post how you are defining variables, determine lengths, etc. Then people might be able to offer some suggestions.
Hitesh Shah
25th July 2005, 19:51
I had tested this quite some time back . It stores value upto the string fields . The moment it encounters numeric field , it doe not ocntinue . Just check this with 85 chrs of total 358 chrs.
Alloc.mem will erminate the entire login only if u have tried to allocate 0 dimension in array . Start with 1 , it should work.
evesely
25th July 2005, 21:11
In my experience, the debugger shows only up to the point where, if it were purely a string, it would end. If you think 'C' programming, this is the \0 "character". So, when you have a numeric field in a record that has a byte whose value is 0, this is where the string display will stop. If you actually do something like rcd.ppmmmttt(95), for example, you may actually see some valuable data from fields later in the record. If you are looking for a specific field, you can use something like rdi.column to find an exact position.
Back to your problem... I don't know if Hitesh hit on your issue or not. If not, post what you are doing. Many people have worked (sometimes suffered) working with records and can no doubt point you in the right direction.
dhowells
26th July 2005, 20:24
Hitesh was correct, it seems to be going only to the first non-char field. I cannot read beyond that point.
I'll give a quick explanation of what I am doing and maybe someone could provide another solution.
I am in the process of evaluating customized objects on the system preparing for an upgrade. Domains for example, there are 630 domains that exist in the patch or standard VRC and also exist in the production (customized) VRC. In reality, I think only a hand full of these are valid 'customized' domains. I believe the rest were just copied up and can be removed. I am trying to compare the customized domain to the standard domain. So I am reading through ttadv400, 401 and 402. I thought the easiest way to do this would be to use the rcd.tttadv400 values and just compare the strings. Doesn't appear like it is going to work, at least for my problem. The record buffer functionality is working properly, I cannot see the fields after the first non-char field.
Thanks for the input already given and any additional help.
Dan
evesely
26th July 2005, 21:24
Have you tried using the cmp.mem() function? This should allow you to compare two based variables regardless of where binary 0s might appear in the record. If cmp.mem(a,b) <> 0, then the records are different.
lbencic
26th July 2005, 22:11
There is also the 'Delete Unchanged Software Components of Package VRC' (ttadv6260m000). I have honestly not tried it, so run in a small test first. The session help says:
"To delete software components of a Package VRC, if they are identical to those of the Package VRC they have been derived from. Differences in "date" and "designer" will not be taken into account."
Sounds like a winner.
dhowells
26th July 2005, 22:17
The delete sessions works. Thanks Lisa