i'm tryng to debug a macro for display the content of a specific position of a screen; following the link http://www-01.ibm.com/software/webservers/hats/library/infocenter/productdir/dgmacsyn.htm#uselogic i copied in my source macro the following source:
<extract name="Get Data" srow="1" scol="1" erow="11" ecol="11"
but i receice the error :
An apex of opening is needed for the attribute "assigntovar" in partnership to a type of element "extract."
can someone post an example ho to extract in a variable a region of the screen and then display it in the console ??
Thanks in advance
Pinned topic Extract the content of a screen problem
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-05-07T17:59:58Z at 2012-05-07T17:59:58Z by tmparker
tmparker 120000EHB3534 Posts
Re: Extract the content of a screen problem2012-05-07T17:59:58ZThis is the accepted answer. This is the accepted answer.Hi,
Are you trying to debug this macro and display the contents of the macro variable in the studio or when you are running this on a server? Depending on where you are running the macro will determine where the output is shown. You can use a trace action to display the contents of the variable. For example, here is an extract I did and the trace action I used to print out the contents:
<actions> <extract assigntovar= "$extractData$" continuous= "false" ecol= "28" erow= "15" name= "'extract1'" planetype= "TEXT_PLANE" scol= "11" srow= "15" unwrap= "false"/> <trace type= "SYSOUT" value= "'extracted data= '+$extractData$" /> </actions>
Now, if you are running this on the server the trace action should display the contents of the macro variable in the console.
If you are running the macro in the studio and want to see the output of the trace action, you will need to use the studio console. There is no way to view this in the studio itself so you need to modify the eclipse.ini file for the studio to add a command to display the console. To turn on the console you need to add the following parameter to the eclipse.ini file:
If you are using RAD 8 this would look something like this:
However, if you are using RAD 7.5, I don't think they used jvm.dll so you may have to make another small change. If you see that it is using javaw.exe instead then you will need to change that to java.exe to make the console work. It would look something like this:
C:\Program Files (x86)\IBM\SDP80\jdk\jre\bin\java.exe
After you do this you should see a DOS command prompt window open and it will show you the internal logging for the studio. When I run my macro with the code above I see the following output:
I hope this helps you understand the tracing.