Eliminate double quote in output of report

Elite237

New Member
Hi, Iam new in this foro. Well, I have a problem with my code. I want that in the output of my report, don´t show the double quote, I have tried with the statemente stream-io, but it doesn´t work. The output is this:

[progress]
"C 110100000000000000000 CAJA MXP 000000000000000000000 A 0 1 0 20090306 11 1 0 0 0 "
[/progress]

but I don´t want the quotes.

The code that I implemented was:

[progress]
DEFINE VARIABLE linea AS CHARACTER FORMAT "X(75)".
DEFINE VARIABLE campo AS CHARACTER format "X(25)".
DEFINE VARIABLE espacio AS CHARACTER FORMAT "X" INITIAL " ".
DEFINE VARIABLE cero AS CHARACTER FORMAT "X" INITIAL "0".
DEFINE VARIABLE sucursal AS CHARACTER INITIAL "CD DEL CARMEN".
OUTPUT TO "C:\Cat-Camsa.txt".
ASSIGN linea = "F " + " " + "110400000000000000000 ".
EXPORT DELIMITER "|" linea.
FOR EACH Natura WHERE Natura.cve_empresa = 1 WITH STREAM-IO:
FOR EACH Cuentas_1 WHERE Cuentas_1.cve_empresa = Natura.cve_empresA
AND Cuentas_1.c = Natura.c WITH STREAM-IO:

IF Cuentas_1.sc = 0 THEN DO:
/* Forma cuenta de mayor */
ASSIGN linea = "C " + " " +
STRING(Cuentas_1.c, "9999") + FILL(cero, 17) + FILL(espacio, 9) + " ".
IF LENGTH(Cuentas_1.descrip) > 50 THEN
linea = linea + SUBSTRING(Cuentas_1.descrip, 1, 50) + " ".
ELSE
linea = linea + Cuentas_1.descrip + FILL(espacio, 50 - LENGTH(Cuentas_1.descrip)) + " ".
ASSIGN linea = linea + FILL(espacio, 50) + " ".
ASSIGN linea = linea + FILL(cero, 21) + FILL(espacio, 9) + " ".
/*
ASSIGN linea = linea + STRING(Natura.natura, "9") + " " + "0" + " ".
*/
ASSIGN linea = linea + "A" + " " + "0" + " ".
IF Cuentas_1.sc = 0 THEN
ASSIGN linea = linea + "1" + " " + "0" + " ".
ELSE
ASSIGN linea = linea + "2" + " " + "0" + " ".
ASSIGN linea = linea + STRING(YEAR(TODAY), "9999") + STRING(MONTH(TODAY), "99") + STRING(DAY(TODAY), "99") + " ".
ASSIGN linea = linea + "11" + " " + " 1" + " " + " 0" + " " + "0" + " " + " 0" + " ".
EXPORT DELIMITER "|" linea.

/* Forma la cuenta de la sucursal */
ASSIGN linea = "C " + " " +
STRING(Cuentas_1.c, "9999") + STRING(Cuentas_1.cve_zona, "99") +
STRING(Cuentas_1.sc, "99999") + STRING(Cuentas_1.ssc, "99999") +
STRING(Cuentas_1.sssc, "99999") + FILL(espacio, 9) + " ".
ASSIGN linea = linea + sucursal + FILL(espacio, 50 - LENGTH(sucursal)) + " ".
ASSIGN linea = linea + FILL(espacio, 50) + " ".
ASSIGN linea = linea + STRING(Cuentas_1.c, "9999") + FILL(cero, 17) + FILL(espacio, 9) + " ".
/*
ASSIGN linea = linea + STRING(Natura.natura, "9") + " " + "0" + " ".
*/
ASSIGN linea = linea + "A" + " " + "0" + " ".
/*
IF Cuentas_1.sc = 0 THEN
ASSIGN linea = linea + "1" + " " + "0" + " ".
ELSE
*/
ASSIGN linea = linea + "2" + " " + "0" + " ".
ASSIGN linea = linea + STRING(YEAR(TODAY), "9999") + STRING(MONTH(TODAY), "99") + STRING(DAY(TODAY), "99") + " ".
ASSIGN linea = linea + "11" + " " + " 1" + " " + " 0" + " " + "0" + " " + " 0" + " ".
EXPORT DELIMITER "|" linea.
END.
ELSE DO:
ASSIGN linea = "C " + " " +
STRING(Cuentas_1.c, "9999") + STRING(Cuentas_1.cve_zona, "99") +
STRING(Cuentas_1.sc, "99999") + STRING(Cuentas_1.ssc, "99999") +
STRING(Cuentas_1.sssc, "99999") + FILL(espacio, 9) + " ".
IF LENGTH(Cuentas_1.descrip) > 50 THEN
linea = linea + SUBSTRING(Cuentas_1.descrip, 1, 50) + " ".
ELSE
linea = linea + Cuentas_1.descrip + FILL(espacio, 50 - LENGTH(Cuentas_1.descrip)) + " ".
ASSIGN linea = linea + FILL(espacio, 50) + " ".
IF Cuentas_1.sssc > 0 THEN
ASSIGN linea = linea + STRING(Cuentas_1.c, "9999") + STRING(Cuentas_1.cve_zona, "99") +
STRING(Cuentas_1.sc, "99999") + STRING(Cuentas_1.ssc, "99999") +
FILL(cero, 5) + FILL(espacio, 9) + " ".
ELSE
IF Cuentas_1.ssc > 0 THEN
ASSIGN linea = linea + STRING(Cuentas_1.c, "9999") + STRING(Cuentas_1.cve_zona, "99") +
STRING(Cuentas_1.sc, "99999") + FILL(cero, 5) +
FILL(cero, 5) + FILL(espacio, 9) + " ".
ELSE
IF Cuentas_1.sc > 0 THEN
ASSIGN linea = linea + STRING(Cuentas_1.c, "9999") + STRING(Cuentas_1.cve_zona, "99") +
FILL(cero, 5) + FILL(cero, 5) +
FILL(cero, 5) + FILL(espacio, 9) + " ".
ELSE
ASSIGN linea = linea + FILL(cero, 21) + FILL(espacio, 9) + " ".
/*
ASSIGN linea = linea + STRING(Natura.natura, "9") + " " + "0" + " ".
*/
ASSIGN linea = linea + "A" + " " + "0" + " ".
IF Cuentas_1.sc = 0 THEN
ASSIGN linea = linea + "1" + " " + "0" + " ".
ELSE
ASSIGN linea = linea + "2" + " " + "0" + " ".
ASSIGN linea = linea + STRING(YEAR(TODAY), "9999") + STRING(MONTH(TODAY), "99") + STRING(DAY(TODAY), "99") + " ".
ASSIGN linea = linea + "11" + " " + " 1" + " " + " 0" + " " + "0" + " " + " 0" + " ".
EXPORT DELIMITER "|" linea.
END.
END.
END.
OUTPUT CLOSE.


[/progress]
 
It's very simple. Don't use the EXPORT-statement, use
PUT UNFORMATTED, just read the help for the PUT-statement.
 
Thanks for you answer. Only I want to comment on other persons who should have the same problem that they have present the following thing:

"The PUT statement never automatically starts a new line. You must use SKIP to explicitly start a new line."

Since of not making it it you returns all the lines.
 
This can also be an advantage since you don't need to build up the line in a variable prior to the put, but can just do a series of puts with any required logic and then include the skip when you are at the end of the line.
 
Back
Top