Acessing symbolics stored within and array? (AREV Specific)
At 02 MAY 2000 03:04:29PM Michael Slack wrote:
I'm working with an Arev 3.12 application. I'm trying to update a program that we will use to convert data from the Arev format to fixed length ascii files. I use a row that holds all the information on how to convert the data to the ascii format. I read the conversion row information into an array within the program. Because of some of the things we are doing we can't use the ImportExport process built into Arev.
What I'm having trouble with is pulling the symbolic created data into a variable within the program so that it can be processed into the ascii file. Here are two examples of what I've tried that have failed.
COLUMN_VALUE={(AA_REC)}
COLUMN_VALUE=CATALYST('{',AA_REC)
In both cases I'm getting the symbolic name so that the symbolic itself can be called and processed so that it will return data. When the program gets to either of these lines of code, it breaks to the debugger with a message of:
Line 1 'RTP27' broke because a run time error was encountered.
My referance material says that RTP27 is "Program Stack Loader". That doesn't mean much to me.
Does anyone have a suggestion as to how I can access a symbolic thru the round-about way I need to go?
Thank you for your time.
Michael Slack
At 02 MAY 2000 03:36PM rayc@symmetryinfo.com wrote:
Mike,
I'm assuming that {AA_REC} is your symbolic. If so, then instead of
COLUMN_VALUE={(AA_REC)} do this,
COLUMN_VALUE={AA_REC} assuming that {AA_REC} is an array of some sort.
Hope this helps,
rayc@symmetryinfo.com onmouseover=window.status=imagine … ;return(true)"
Ray Chan ~ Symmetry Info
At 02 MAY 2000 04:29PM Warren wrote:
Not quite clear on what is in the array. Are these just the dictionary item names for the symbolics? If so open the the dictionary of the data file to @DICT and read the data row into @RECORD and set @ID to the record key after which the braces ({}) should work.
At 02 MAY 2000 04:37PM Michael Slack wrote:
Ray:
I'll give it a try but I'm sceptical. The AA_REC is a record/row that contains the information my program is using to determine which fields/columns to process and make the individual ascii records. It contains arev dictionary information like dictionary name, position number, column type, single/multivalue flag and a couple of others. It also contains information on how to convert the arev data to the ascii format, such as which position within the ascii records is the data to be placed, can it be null, field length and a few others.
For my example, the AA_REC is getting the dictionary name of the arev table for a given column. I then want to take that dictionary name and kick off that symbolic and get the resulting data back. Once I have the data from the symbolic, I can process it for inclusion to the ascii record.
Thank You,
Michael Slack
At 02 MAY 2000 05:07PM Michael Slack wrote:
Warren:
Thank you for the suggestion. I got be a bit closer to my goal.
I set @DICT, @RECORD and @ID with all of the current values. Now when it gets to the line of code that reads:
COLUMN_VALUE={(AA_REC)}
I receive the error message:
"(AA_REC)" Can not be exicuted, it does not exist in the dictionary.
What seems to be happening is that anything within the braces ({}) is taken as a litteral string. What I have in there is a variable. I thought that I could force it to evaluate the variable by putting the parenthises 1) around the variable but that isn't working.
One of my avenuse of investigation is to try and find a way to get a variable value to be evaluated by the braces ({}).
Thank You,
Michael Slack
At 02 MAY 2000 05:29PM Bill Titus wrote:
Michael,
You might give this a try:
COLUMN_VALUE=CATALYST('{',QUOTE(AA_REC))
The QUOTE() command makes the variable a real dictionary item name rather than a variable.
At 02 MAY 2000 05:39PM Warren wrote:
In this case try:
temp=AA_REC
Then use CALCULATE(TEMP) in place of the {xxxx} clause you are using.
At 02 MAY 2000 06:54PM C Johnson wrote:
Perhaps instead of passing the variables directly you could place them in a system variable and then grab the information from within the symbolic.
Assuming that AA_REC is the name of the symbolic, add the following to your code:
@USER1=AA_NAME$
@USER1=J
COLUMN_VALUE={AA_REC}
Add to the symbolic:
AA_NAME$=@USER1
J=@USER1
At 03 MAY 2000 01:26AM Richard Hunt wrote:
Your problem… hmmm…
COLUMN_VALUE={(AA_REC)}
COLUMN_VALUE=CATALYST('{',AA_REC)
Try this…
COLUMN_VALUE=CALCULATE(AA_REC)
If this causes the error NOT IN VOCABULARY… then check out the variable AA_REC. If this variable is multivalued it will decieve you. Make absolutely sure it is a single value variable.
It definately works for me. It did fail when my variable was multivalued. I bet your variable is multivalued or is NOT the value you think it is. Check it out.
At 03 MAY 2000 09:59AM Michael Slack wrote:
To all, thank you for your help. I was able to use the CALCULATE function to evaluate the variable so that I could run a symbolic and get the results. This will be a hugh help in the process I'm creating so that we can transfer some of our Arev data to an outside, non-Arev system.
Thank You,
Michael Slack