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
 

 

Map having decimal data entry field

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

Active User


Joined: 27 Sep 2008
Posts: 186
Location: chennai

PostPosted: Thu Nov 20, 2008 12:09 am    Post subject: Map having decimal data entry field
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    Post subject:
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: 186
Location: chennai

PostPosted: Thu Nov 20, 2008 11:30 pm    Post subject:
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: 8002
Location: Bellevue, IA

PostPosted: Fri Nov 21, 2008 12:02 am    Post subject:
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: 186
Location: chennai

PostPosted: Sat Nov 22, 2008 11:35 pm    Post subject:
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: 8002
Location: Bellevue, IA

PostPosted: Sun Nov 23, 2008 5:18 am    Post subject:
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: 186
Location: chennai

PostPosted: Sun Nov 23, 2008 10:32 pm    Post subject:
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: 8002
Location: Bellevue, IA

PostPosted: Sun Nov 23, 2008 10:57 pm    Post subject:
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: 186
Location: chennai

PostPosted: Tue Nov 25, 2008 11:42 pm    Post subject:
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: 8002
Location: Bellevue, IA

PostPosted: Tue Nov 25, 2008 11:55 pm    Post subject:
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: 186
Location: chennai

PostPosted: Thu Nov 27, 2008 11:12 pm    Post subject:
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    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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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