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

How to (in 40B) CREATE DATA dref TYPE??

How can I dynamically define a working storage area to be like a structure in a 40B environment?

The "CREATE DATA dref TYPE" works great in 46C and on.

Ken

likpco@comcast.net

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2004 at 06:08 AM

    Did you check Field-Symbols ? I am sure, if you can be a little more elaborate, someone can help you,(perhaps even with a code).

    Regards,

    Subramanian V.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2004 at 08:05 AM

    Hi,

    the dynamic creation of data objects is available as of Release 4.6.

    In older releases you can try to declare a data object of type c or x as a container work area and assign it with ASSIGN CASTING to a field symbol that is properly typed. Then you work with the field symbol in place of the data object.

    But note, that this is not a panacea and must used with care.

    Regards

    Horst

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Horst Keller

      Horst,

      When TABNAME = 'VBAP', the code aborts with ASSIGN_BASE_WRONG_ALIGNMENT. I believe it does this because there is a floating point field in VBAP. Your code does work for many other tables including VBAK. If you run this to assist me to see the dump, be sure to increase the size of "container(1000) TYPE x" since VBAP is more than 1000 bytes.

      Any ideas on how to handle this?

      Ken

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.