Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6970
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 reg query on DYNALLOC feature raghuraman123 SYNCSORT 12 Wed Jan 10, 2018 2:42 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us