Skip to Content
author's profile photo Former Member
Former Member

clarification needed on ASSIGN statement

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 26, 2007 at 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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 26, 2007 at 10:31 AM

    Hi sarika,

    1. Use brackets ().

    2.

    assign (x) to <datain>.

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 26, 2007 at 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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.