Focal Point
[SOLVED] Special Characters in Hold File while doing IBI.FIL

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5247004096

June 19, 2018, 11:16 AM
tomatosauce
[SOLVED] Special Characters in Hold File while doing IBI.FIL
I am trying to create a hold file which feeds data to a dropdown list using our custom js framework. Following is the fex procedure.

 

-DEFAULTH &A = 'All';

SET HOLDLIST=PRINTONLY
SET ASNAMES = ON
SET PAGE = NOLEAD

ENGINE SQLORA SET DEFAULT_CONNECTION wmbi
SQL SQLORA

SELECT
   Distinct loc_regn_num,
	'<option value="' || loc_regn_num || '">' || loc_regn_num||'-'||loc_regn_nm || '</option>' AS listvalue
FROM
	loc_dim
where loc_stat_cd = 'A'
and loc_regn_num is not null
and LOC_OPEN_DT is not null
and LOC_CLOSE_DT > SYSDATE
ORDER BY loc_regn_num
; 

TABLE FILE SQLOUT
PRINT LISTVALUE AS ''
BY LOC_REGN_NUM NOPRINT
ON TABLE HOLD AS TMP
END


-RUN
-HTMLFORM BEGIN
<option value="ALL" Selected>&A</option>
!IBI.FIL.TMP;
-HTMLFORM END

 


I am getting the output as follows

  
<option value="ALL" Selected>All</option>
-<option value="1">1-Northeast Region</option>
+<option value="2">2-Central Region</option>
)<option value="3">3-South Region</option>



Instead i should be getting something like this without the -,+,} symbols

  
<option value="ALL" Selected>All</option>
<option value="1">1-Northeast Region</option>
<option value="2">2-Central Region</option>
<option value="3">3-South Region</option>



I have tried different options but wasn't able to figure it out. Am i doing something wrong in creating the hold file?

This message has been edited. Last edited by: FP Mod Chuck,


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
June 19, 2018, 11:44 AM
FP Mod Chuck
Tomatoesauce

Insert the following code after your -RUN and comment out the HTMLFORM code which will create a report and validate the contents of the hold file. I will be surprised if the leading characters - + and ) are displayed.


TABLE FILE tmp
PRINT LISTVALUE
BY LOC_REGN_NUM
ON TABLE PCHOLD FORMAT HTML
END



Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 19, 2018, 12:07 PM
tomatosauce
Contents of hold file seem to be without the special characters. They just show up when i try to do !IBI.FIL.TMP


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
June 19, 2018, 12:56 PM
David Briars
Guessing the format of LISTVALUE is variable, e.g,. AnV.

? HOLD TMP should confirm.

If it is variable, convert to fixed format. An.

Something like...
TABLE FILE SQLOUT
PRINT 
COMPUTE NEWVALUE/A1024 = LISTVALUE;
BY LOC_REGN_NUM NOPRINT
ON TABLE HOLD AS TMP
END

This message has been edited. Last edited by: David Briars,
June 19, 2018, 01:04 PM
tomatosauce
David,

you are awesome. Changing it to fixed format did the trick.


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs