April 16, 2007, 08:55 AM
<Navin>CONCATENATING in the HOLD file
Hi
SQL SQLORA
SELECT 'A' A FROM DUAL;
TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT
*
COMPUTE B/A10 = "a" | A ;
END
**************************************
My Intention is to print B as "aA" . Rather than using the value in the dual i want to concatenate the "a" with A and print it as "aA".
So i use the following code to print. But it throws the follwoing error though the result is an alphanumeric.
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: B
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND
So any resolutions ??
April 16, 2007, 08:59 AM
FrankDutchNavin
what is the picture of your original field "A" ?
if this is p.e. A15 or D7.2 or YYMD you can not concatenate the "a" and that field, it should fit.
Frank
April 16, 2007, 09:21 AM
Leahquote:
COMPUTE B/A10 = "a" | A ;
Have you tried changing the double quote mark to a single quote mark in the above. If the length of A is 9 or less what you have will work, however as Frank says if it isn't alpha it won't until converted.
April 16, 2007, 10:02 AM
BlueZoneNavin :
Like Frank says, I would first inquire the field format of the field A in your hold file by using this command -
? HOLD holdfilename
Make sure it is what you think it should be and then do the concatenation.
Sandeep Mamidenna
April 17, 2007, 12:22 AM
<Navin>All
like every one said the length of the A in the hold file is 32.
*************** HOLD FILE *********************
0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1
0DEFINITION OF HOLD FILE: HOLD
0FIELDNAME ALIAS FORMAT
A E01 A32 MISSING = ON
***********************************************
So when i used as A33 , it worked.
But can anyone say why it is taking defaultly as 32 for just a single character. ??