View previous topic :: View next topic
|
Author |
Message |
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
Is it possible to store the field of diff types such as alphanumeric , COMP value , numeric , and field of different lengths into a single working storage variable and string each and every time
For eg:
My first field content will be numeric of length 11
My second field content will be alphanumeric of length 5
My third field content will be packed decimal of length 4
So each and evry time while running I want to string the field content along with other variables,,
Whether it is possible ?
R can anyone please help me in suggesting some other alternatives and explain with an example |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Gay,
Unless i misunderstood you... I guess whatever you have asked is pretty basic stuff in COBOL..
Quote: |
Is it possible to store the field of diff types such as alphanumeric , COMP value , numeric , and field of different lengths into a single working storage variable |
Yes... its possible
Quote: |
I want to string the field content along with other variables |
Could you plz explain.. probably with some sample data.. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
As Binop has stated, yes this can be done.
a hint - STRING (and UNSTRING)
[as the command name implies]
only works on X-type and display.
so, if your output result is expected to contain the fields as COMP, COMP-3, etc.
you need to redefine each field as x-type for the STRING command to compile. |
|
Back to top |
|
|
|