12-26-2007 10:27 AM
Hi ,
when i write " ASSIGN P0000-MASSN to <DATAIN>" the value of p0000-massn is being assigned to <datain>.
But when i did like below iam not getting.
concatenate 'P' '0000' '-' 'MASSN' into x.
assign x to <datain>.
now the value is not getting assigned . why?
12-26-2007 10:34 AM
Hi,
Use the following statement :
assign (x) to <datain>.
This will assign the value which is contained in x.
If you use assign x to <datain>, then x would be assigned to <datain>.
Hope this clarifies your doubt.
Regards,
Lalit
12-26-2007 10:31 AM
Hi sarika,
1. Use brackets ().
2.
assign (x) to <datain>.
regards,
amit m.
12-26-2007 10:34 AM
Hi,
Use the following statement :
assign (x) to <datain>.
This will assign the value which is contained in x.
If you use assign x to <datain>, then x would be assigned to <datain>.
Hope this clarifies your doubt.
Regards,
Lalit
12-26-2007 10:39 AM
Hi Sarika
Instead of the statement
assign x to <datain>.
Use this statement
assign (x) to <datain>.
This is done because when u concatenate 'X' will store only the string 'P0000-MASSN'. It does not actually point to the value of massn. By using the braces we are actually making the system look for the value stored in P0000-MASSN.
Thanks
Sharath.
12-26-2007 12:28 PM
Hi sharath,
Thanks for ur immediate reply but it is not working. Can you suggest another way.
thanks.
SARIKA.
12-26-2007 12:36 PM
Hi Sarika,
Check this sample program
REPORT test.
data:
x type char20,
p0000 type p0000.
field-symbols:
<fs> TYPE any.
p0000-massn = '01'.
write: p0000-massn.
concatenate 'P' '0000' '-' 'MASSN' into x.
ASSIGN (X) TO <fs>.
<fs> = '02'.
write: p0000-massn.
12-26-2007 12:37 PM