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 Profile Log in to check your private messages Log in
 
Move $ to Numeric Field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
jivisampath

New User


Joined: 27 Jun 2005
Posts: 2
Location: bangalore

PostPosted: Tue Jul 26, 2005 1:07 pm    Post subject: Move $ to Numeric Field
Reply with quote

Hai This is sampath.........

i have

A pic ((3) value 123.
b pic $$9.
Move A to B.

Then what will be the value in B?

Give me the rply.............
Back to top
View user's profile Send private message

rssomm

New User


Joined: 05 Jun 2005
Posts: 41
Location: Hyderabad

PostPosted: Tue Jul 26, 2005 1:34 pm    Post subject:
Reply with quote

123

Madhu
Back to top
View user's profile Send private message
donevin

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Tue Jul 26, 2005 1:45 pm    Post subject: Re: cobol
Reply with quote

Hi

I suppose you mean A is Pic 9(3). I think b's value will be $23. This is because when there is more than one sign in a picture clause it is a floating sign. The sign will float to the right hand side in the picture clause untill it finds the most significant digit, and suppress all zeroes while doing so. The sign will then be inserted in the picture clause to the left of the most significant digit. If the number of digits is more than or exactly as much as the picture clause, than the sign will overwrite the leftmost digit in the number. Correct if I am wrong please.
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Tue Jul 26, 2005 9:17 pm    Post subject:
Reply with quote

Hi Sampath!

Quote:
A pic ((3) value 123.
b pic $$9.
Move A to B.

Then what will be the value in B?


If we are mentioning more than one $, it will just act as floating sign as donevin said. B contains $23.

These simple things you can just give a try right!
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

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