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
 

 

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 Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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