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
 

 

Redefines question

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

New User


Joined: 27 Sep 2005
Posts: 8
Location: Gurgaon

PostPosted: Mon Aug 25, 2008 9:43 am    Post subject: Redefines question
Reply with quote

What will happen if a variable is declared as below..
Explain with an example?

Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).
Back to top
View user's profile Send private message

rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Aug 25, 2008 9:47 am    Post subject: Reply to: Redefines question
Reply with quote

hi,

did you try writing a small program & test ??

let the forum know ....... if you find anything interesting!

Time to experiment icon_idea.gif
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Mon Aug 25, 2008 10:31 am    Post subject: Re: Redefines question
Reply with quote

gaps030980 wrote:
What will happen if a variable is declared as below..
Explain with an example?

Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).


Similar posts you can find..Just Search ...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Mon Aug 25, 2008 10:37 am    Post subject: Re: Redefines question
Reply with quote

Hi,
gaps030980 wrote:
Explain with an example?
I re-read it many times, any how it doesn't look like a request, oh..I'm being just tested I think, No prblems, let's go ahead..tests turn me on.. icon_smile.gif.

Check these links and post us back if you don't find out what you are looking for, please post back after a lil labour from your side.. icon_smile.gif

http://www.ibmmainframes.com/viewtopic.php?t=24349&highlight=redefines
http://www.ibmmainframes.com/viewtopic.php?t=31503&highlight=redefines
http://www.ibmmainframes.com/viewtopic.php?t=29175&highlight=redefines
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Mon Aug 25, 2008 10:38 am    Post subject:
Reply with quote

Hello again,

BTW, what do you think what should happen, when you say -
Quote:
What will happen if a variable is declared as below..
does something strange happen at your end ?
Back to top
View user's profile Send private message
gaps030980

New User


Joined: 27 Sep 2005
Posts: 8
Location: Gurgaon

PostPosted: Mon Aug 25, 2008 12:08 pm    Post subject:
Reply with quote

I am getting a SOC-7. I tried. Guess because I am moving non -numeric data to num field.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Aug 25, 2008 12:24 pm    Post subject: Reply to: Redefines question
Reply with quote

Quote:
am getting a SOC-7. I tried. Guess because I am moving non -numeric data to num field.


Moving alone will not cause SOC-7 . It would abend with SOC7 only when you do arithmetic operations on a numeric field populated with non-numeric data . If am not wrong, this was once posted in this forum.
Back to top
View user's profile Send private message
vv

New User


Joined: 06 Jan 2008
Posts: 10
Location: bangalore

PostPosted: Mon Aug 25, 2008 4:35 pm    Post subject:
Reply with quote

initially 9(9( value will be allocated after that any spaces will be allocated
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Mon Aug 25, 2008 4:41 pm    Post subject:
Reply with quote

I think some words are is stuk-up there in your key board, please complete the sentence..
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 25, 2008 8:52 pm    Post subject:
Reply with quote

Hello,

Quote:
I am getting a SOC-7. I tried. Guess because I am moving non -numeric data to num field.
A redefines will not cause an 0c7.

Invalid numeric data will.

Simply redefining an "x" field as a "9" field does not make the content numeric. You must validate and/or correct the data before you use it.

Quote:
initially 9(9( value will be allocated after that any spaces will be allocated
This needs clarification. . .
Back to top
View user's profile Send private message
John K

New User


Joined: 27 Aug 2008
Posts: 3
Location: St. Louis, MO

PostPosted: Wed Aug 27, 2008 9:16 pm    Post subject: Reply to: Redefines question
Reply with quote

You'll find you get the most effective help if you explain what are you trying to accomplish. At this point one can only guess.
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 QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm


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