IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Map having decimal data entry field


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Thu Nov 20, 2008 12:09 am
Reply with quote

Hi all

I have a problem with my map field.
One of my map field has to accept decimal data for a db2 table having datatype dec(7,2). The same field is to used for displaying the data from the db2 table with decimal point. I have used PICIN and PICOUT. But while compiling map, it gives length mismatch for that field. What is the solution to rectify it.
Please someone help me...

Thanks in advance
Raghunathan
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Nov 20, 2008 5:00 am
Reply with quote

please show the BMS DFHMDF map definition and the error message
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Thu Nov 20, 2008 11:30 pm
Reply with quote

Hi Earl

Thanks for the response.
The DFHMDF is as follows. It may have some alignment problem here, but not in PDS.
DFHMDF POS=(13,01),LENGTH=13,ATTRB=PROT, *
INITIAL='Opening Amt :'
OPNAMT DFHMDF POS=(13,15),LENGTH=7,PICIN='99999V99', *
PICOUT='99999.99',ATTRB=UNPROT

While Assembling there is no alignment problem. But the error due to the
length=7 parameter. The length does not satisfy the PICIN and PICOUT.
Please suggest a solution. I want to display the field with decimal point when sending the map.
Thanks
Raghu
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 21, 2008 12:02 am
Reply with quote

Let's see ... 5 nines, a period, 2 nines ... adds up to 8 characters to me. Change your map to allow for 8 characters in the field.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Sat Nov 22, 2008 11:35 pm
Reply with quote

Hi Robert

I changed to length=8, then I got error PICIN is 7 in length

RaGHU
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 23, 2008 5:18 am
Reply with quote

Uh, if you change the length you'll need to change the PICIN, won't you?
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Sun Nov 23, 2008 10:32 pm
Reply with quote

Hi Robert

If I change the length of PICIN, which part( integer part or decimal part?)
I would increase?

Thanks
Raghu
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 23, 2008 10:57 pm
Reply with quote

You need to increase the integer part, because otherwise you've got a decimal alignment problem. However, your larger problem that you need to think about is that the PICIN and PICOUT don't match -- you're going to have to do some manipulation in your program to get the pictures matching at some point.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Tue Nov 25, 2008 11:42 pm
Reply with quote

Hi Robert

If I increase the integer part by 1 position, the length mismatch problem is over. But when entering value in this field there is another problem. For example I entered 12345678. The value stored is 23456.78. That became a big mistake. If the length is increased in decimal part and if
I am entering 12345678, the value stored is 12345.67. The last digit will be truncated. So I have to give instruction to the user, how to enter data in this field. Is there any way to avoid this problem?

Anyway thanks for your advise.
Regards
Raghunathan
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Nov 25, 2008 11:55 pm
Reply with quote

Possibility 1: make it 8 alpha characters and use BIF DEEDIT on the input to remove non-numeric characters. Let the user enter a decimal point if they want.
Possibility 2: document with many examples exactly how the users are to enter data and show the output they will get.
Possibility 3: separate the integer and decimal parts into two fields and have them entered separately. This may require an extra "tab" by the user should they not fill the enter integer field.

This is one of those cases where you select an option based on the application, screen space available, and desired business results and go with it. Personally, I wouldn't want to be truncating the left digit of an integer, though, since you lose significance by doing so.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Thu Nov 27, 2008 11:12 pm
Reply with quote

Hi Robert

I used this technique( BIF DEEDIT ) and the problem is solved. User can enter data with decimal point.

Thanks for your kind support.

Regards
Raghu
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top