IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

query - Regarding field of diff types


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Fri Oct 30, 2009 11:06 am
Reply with quote

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
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri Oct 30, 2009 11:23 am
Reply with quote

Hi Gay,

Unless i misunderstood you... I guess whatever you have asked is pretty basic stuff in COBOL.. icon_cool.gif

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.. icon_razz.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 30, 2009 3:29 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
Search our Forums:

Back to Top