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
 
cobol working storage

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
lineesh_kumar

New User


Joined: 20 Feb 2006
Posts: 6

PostPosted: Tue Jun 22, 2010 11:40 pm    Post subject: cobol working storage
Reply with quote

I have a working storage field contains the name of another working storage field. How can read the value of second field using the first field.

WS-A PIC X(10).

WS-B PIC X(10).

MOVE 'WS-A' TO WS-B.

Using WS-B how can I get the value of WS-A.
Is there any intrinsic function or value of function?

Regards
Lineesh
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jun 22, 2010 11:55 pm    Post subject:
Reply with quote

COBOL is not visual basic or c or java.

why do you need to do this?
if you would explain what you are trying to do,
someone can provide the cobol to accomplish your task.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Wed Jun 23, 2010 10:35 am    Post subject:
Reply with quote

Can be done with EVALUATE
http://ibmmainframes.com/viewtopic.php?t=48404
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jun 23, 2010 3:39 pm    Post subject:
Reply with quote

I'm afraid and totally bowled out - what are we talking about in this thread? icon_cry.gif
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Jun 23, 2010 3:45 pm    Post subject:
Reply with quote

about a kind of INTERPRET or Pointers in COBOL
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jun 23, 2010 3:53 pm    Post subject:
Reply with quote

some pgm-languages allow for the contents of an address to contain an address of which those contents are to be used as data.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jun 23, 2010 3:59 pm    Post subject:
Reply with quote

Right, the pointer-concept of language-C? But if that's true - I was not able to infer that from this
Quote:
Using WS-B how can I get the value of WS-A.
..I'll keep silence now.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Thu Jun 24, 2010 5:03 pm    Post subject: Reply to: cobol working storage
Reply with quote

REXX can do this without blinking:
Code:
ws_a = 5
ws_b = 'ws_a'

interpret "say 'the value is '"ws_b     /* displays the value is 5     */
say 'the value is 'value(ws_b)          /* displays the value is 5 too */

But no such thing in COBOL... icon_sad.gif
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 sharing PLI storage Pedro PL/I & Assembler 2 Mon Oct 16, 2017 10:11 pm
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am

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