Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

query - Regarding field of diff types

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: query - Regarding field of diff types
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us