Focal Point
[CLOSED] DMC char count of txt file

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/1497077476

February 18, 2015, 04:24 PM
ray_In_Vancouver
[CLOSED] DMC char count of txt file
I want to open a txt file and return the char count using DMC.

Thx

This message has been edited. Last edited by: Tamra,


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
February 23, 2015, 11:49 AM
Clif
If the text file just has one line you do this with Dialog Manager. Create a stored procedure:
FILEDEF INFILE DISK filename (LRECL 256
-RUN
-SET &INFIELD=0;                
-READ INFILE &INFIELD.A256B. 
-SET &INFIELD=RTRIM(&INFIELD);
-TYPE &INFIELD.LENGTH

February 23, 2015, 12:13 PM
ray_In_Vancouver
quote:
-SET &INFIELD=RTRIM(&INFIELD);


getting error. other then that works perfect.

02/23/2015 09:05:24 LOOPBACK 0 ERROR AT OR NEAR LINE 6 IN PROCEDURE __WCFEX FOCEXEC *
02/23/2015 09:05:24 LOOPBACK (FOC263) EXTERNAL FUNCTION OR LOAD MODULE NOT FOUND: RTRIM


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
February 24, 2015, 10:30 AM
Clif
Sorry, RTRIM is a new "simplified" function in 7.7.06. You could use the legacy function TRIMV
   
-SET &INFIELD=TRIMV('T', &INFIELD, 256, ' ', 2, 'A256V'); 

This message has been edited. Last edited by: Clif,
February 24, 2015, 01:21 PM
ray_In_Vancouver
thx Clif works great


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server