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
 

 

Retreiving Decimal Values From BMS map

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
k.saravanan

New User


Joined: 12 Mar 2005
Posts: 1

PostPosted: Thu Mar 17, 2005 11:19 am    Post subject: Retreiving Decimal Values From BMS map
Reply with quote

We are Using CICS For Data Collection. I dont know how to retrieve a Decimal Values From the Map.

I used PICIN and PICOUT of DFHMDF,

Since i am using that i am unable to Retrieve the Decimal Point which i entered in the bms.

Tell, Is this proper way or Suggest me Some other method to retrive the Decimal values from the map.

regards,
saravanan
Back to top
View user's profile Send private message

rick

New User


Joined: 18 Jun 2004
Posts: 59
Location: Chennai

PostPosted: Thu Mar 17, 2005 6:13 pm    Post subject:
Reply with quote

Hi,

You could do it with PICIN and PICOUT Clause. But be careful in usage of these two clause when handling decimal points.

Say you want to accept 12345.67 as your input. Your coding should be like this

Code:


    DFHMDF POS=(10,10),LENGTH=8,PICIN='9(5)V9(3)',PICOUT='9(5).9(2)'


if u are trying to give the same value in both PICIN and PICOUT it might give an error. Becoz

9(5)v9(3) takes 8 bytes and
9(5).9(3) takes 9 bytes.

Try it,
Back to top
View user's profile Send private message
sarma Kappagantu

New User


Joined: 17 Mar 2005
Posts: 22
Location: Bangalore

PostPosted: Mon Mar 21, 2005 11:47 am    Post subject:
Reply with quote

This picout of 9(nn).9(mm) works fine with output. How about input? It is better to use, two separate variables one of the integer part and the other for decimal part. All problems solved.
Back to top
View user's profile Send private message
vmj

New User


Joined: 16 May 2006
Posts: 16
Location: Philippines

PostPosted: Mon May 07, 2007 3:05 pm    Post subject:
Reply with quote

rick wrote:
Hi,

You could do it with PICIN and PICOUT Clause. But be careful in usage of these two clause when handling decimal points.

Say you want to accept 12345.67 as your input. Your coding should be like this

Code:


    DFHMDF POS=(10,10),LENGTH=8,PICIN='9(5)V9(3)',PICOUT='9(5).9(2)'


if u are trying to give the same value in both PICIN and PICOUT it might give an error. Becoz

9(5)v9(3) takes 8 bytes and
9(5).9(3) takes 9 bytes.

Try it,


Hi rick,

hope you can still help me here. Same with sarma, we have no problem here with PICOUT.

We input a numerical value with decimals into a field (let's name it x) define in the map as PICIN='9(15)v9(3)',PICOUT='9(15).9(2).

we need to process x and we discover that x still contains the decimal points/period, and with that we are unable to do arithmetic operation with field x.

we will appreciate any explanations/help/suggestions/comments from anyone.

thanks for reading....
Back to top
View user's profile Send private message
gm_laks

New User


Joined: 10 Jul 2007
Posts: 7
Location: banagalore

PostPosted: Tue Jul 10, 2007 11:46 pm    Post subject:
Reply with quote

i have a suggestion to do it programtically.

define the following variables

num-1.
num-1-bef pic 9(15).
filler pic x(01).
num2-aft pic 9(2).

num-2.
num2-bef pic 9(15).
num2-aft pic 9(2).

number-2 redefines num-2 pic 9(15)v9(2).

move x to num-1
move num-1-bef to num2-bef
move num-1-aft to num2-aft.

now you can use the variable number-2 for all arithmetic purposes.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jul 11, 2007 12:08 am    Post subject:
Reply with quote

It is a heck of a lot easier to use FUNCTION NUMVAL to de-edit the field.

For what it's worth, if the PICIN is X(nn), it can be moved directly to a S9(nn)v9(n) field with correct sign, decimal alignment and padding (according to the section on Elementary moves in the explanation of the MOVE statement in the Procedure Division statements chapter in the Enterprise COBOL for z/OS and OS/390 Language Reference.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am


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