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

moving values from CICS screen to database


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Robert Sample

Global Moderator


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

PostPosted: Wed May 06, 2009 2:45 pm
Reply with quote

Quote:
But the problem is still not solved...
And you've been asked for data you haven't provided. If you're using CICS, you have a program that is being run when you enter the transaction name. The variable definitions in that language, and the data movement steps getting the values from the map and back, are absolutely critical to figure out your problem. Without them, we can't help.
Back to top
View user's profile Send private message
hills

New User


Joined: 27 Apr 2009
Posts: 8
Location: Bangalore

PostPosted: Wed May 06, 2009 3:23 pm
Reply with quote

Map Definitions will take 'X'.

now in the map, I can enter only 5 values at max.

I am giving 12345 in the map

Now In the program I am using this input value and moving directly into database:-
Code:
MOVE  LCRATEI     TO    TBS-LCALL-RATE
MOVE  LDCRATI              TO    TBS-SDCALL-RATE
MOVE  ISDRATI              TO    TBS-ICALL-RATE


and then running the SQL query as below:-
Code:
EXEC SQL
         INSERT INTO TBSPLTR (TBS_LCALL_RATE,
                                            TBS_SDCALL_RATE,
                                            TBS_ICALL_RATE)
                             VALUES  (:TBS-LCALL-RATE,
                                           :TBS-SDCALL-RATE,
                                           :TBS-ICALL-RATE)
END-EXEC.


In the database the columns are defined as DEC(5,2).

When I am checking database SPUFI, the value is shows as 345.00

Do tell me if you need more information.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 06, 2009 11:49 pm
Reply with quote

Hello,

What part of this
Quote:
The variable definitions in that language,
was not clear?

As you have no idea what the problem is, you need to provide the info that was requested to try to help you. You do not need to decide what people should have - simply provide all of the requested info.

After this many iterations, it would probably be best if you copy/paste and "Code" all of the requested info in one reply so that people trying to help have everything available in one place.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Thu May 07, 2009 1:23 am
Reply with quote

Hi hills

To rectify this problem easily, you better define your map variable with PICIN. When using PICIN, you just specify the actual length of data
(eg. for DEC(5,2), PICIN='9(3)V99' ). Then you can move the data directly from the map variable(Host variable) to the database. Assume that you are not placing a decimal point in the map at the time of data entry. Make sure that the map is used for input only(MODE=IN).
If the MODE=INOUT, you have to code PICOUT also. PICOUT='9(3).99'. Here the length of PICIN and PICOUT will not satisfy(LENGTH=5). See the modified MACRO below.

Code:
ADJAM3  DFHMDF POS=(10,28),ATTRB=(FSET,UNPROT,NUM),COLOR=NEUTRAL,      X
               HILIGHT=UNDERLINE,LENGTH=6,                             X
               PICIN='9(4)V99,PICOUT='9(3).99'


In this case you can enter 6 digits without putting a decimal point. What ever data you are entering, that will be right justified and the last two digits will be considered as part decimal point. Assume you are entering 123456, the actual data stored in the table will be 234.56. So care should be taken at data entry time. If the map is defined for input only, then there is no PICOUT, no mismatch of length.

There are other methods also to rectify your issue.
First you try this. If not satisfied, post your requirement. Someone will help you.

Regards
Raghu
Back to top
View user's profile Send private message
hills

New User


Joined: 27 Apr 2009
Posts: 8
Location: Bangalore

PostPosted: Thu May 07, 2009 4:33 pm
Reply with quote

Hi Raghu,

Thanks, the problem is solved. I used PICIN. Data is being moved correctly from CICS screen to database.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top