Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
k.saravanan

New User

Joined: 12 Mar 2005
Posts: 1

 Posted: Thu Mar 17, 2005 11:19 am    Post subject: Retreiving Decimal Values From BMS map 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

rick

New User

Joined: 18 Jun 2004
Posts: 59
Location: Chennai

Posted: Thu Mar 17, 2005 6:13 pm    Post subject:

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,
sarma Kappagantu

New User

Joined: 17 Mar 2005
Posts: 22
Location: Bangalore

 Posted: Mon Mar 21, 2005 11:47 am    Post subject: 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.
vmj

New User

Joined: 16 May 2006
Posts: 16
Location: Philippines

Posted: Mon May 07, 2007 3:05 pm    Post subject:

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.

gm_laks

New User

Joined: 10 Jul 2007
Posts: 7
Location: banagalore

 Posted: Tue Jul 10, 2007 11:46 pm    Post subject: 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.
William Thompson

Global Moderator

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

 Posted: Wed Jul 11, 2007 12:08 am    Post subject: 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.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us