As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
-SET &FIL='&EDATEMP.EVAL'||'test.trc'; -RUN -* SET TRACEUSER=&FIL.EVAL -RUN -? &
FILEDEF TRACE DISK &FIL.EVAL -RUN
APP PATH BASEAPP DEFINE FILE TRACE RESULT/A175 = SUBSTR(200,LINE,41,200,155,'A155'); END TABLE FILE TRACE PRINT RESULT WHERE LINE CONTAINS 'NGtrEvnt' WHERE (LINE CONTAINS '>' OR LINE CONTAINS '<' OR LINE CONTAINS '%3C' OR LINE CONTAINS '%3c' OR LINE CONTAINS '%3E' OR LINE CONTAINS '%3e' ) ; ON TABLE HOLD END -RUN
The logic works fine, Only issue is i want to suppress all the &variables when try to view the source by right clicking...
If I understand you correctly, you want the output of the -? & command to be put in the trace file, which you then can table to find all offending values. So far OK. But when that process is done you will have to send something back to the browser, but that will contain the result of the -? & command also, visible when doing a view source. And that is something you do not want. Did I undertstand this correctly? You could search for something to prevent doing a right mouse click but that is not 100 % sufficient, I guess. If you do not care what is being presented, as long as it is not the result, you could do something like this after finding ans saving the offending variables:
TABLE FILE SYSCOLUM
ON TABLE SET PREVIEW ON
SUM COMPUTE TOTALOFF/A50 = 'Number of offending variables found = &LINES'; AS ''
ON TABLE PCHOLD FORMAT PDF
There is no way to prevent the output of the values aother than outputting something that clears the html comments ... like PDF or XML or something like that.
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I don't get the point of this. First you want to "suppress the -? & command", then you want to "trace all the & variables", sounds like opposites. Then you want to "read all the variables and scan for unwanted codes" with which you probably mean "read all the code to look for unwanted code".
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server