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
 

 

picture reformat decimals

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

New User


Joined: 20 Jul 2007
Posts: 27
Location: bangalore

PostPosted: Thu Sep 24, 2009 9:00 pm    Post subject: picture reformat decimals
Reply with quote

i have a field on screen x(08) (99.99999)
the user will be entering on the screen in this format 99.99999
For example he may enter as 1.111 or 0.111

i refined ws- x pic x(08) to ws-y pic 9(2)V9(05)

So if i enter 1.1212 on the screen the value in ws-y will be 0011212
the value in ws-y should not be greater than 99.99999 or = 00.00000
so i am reformating as
05 WS-7-FLD PIC 99.9(5).
05 WS-7-BYTE-REFORMAT REDEFINES WS-7-FLD.
10 WS-7-BYTE-LEFT PIC 9(2).
10 WS-7-BYTE-DECIMAL PIC X(1).
10 WS-7-BYTE-RIGHT PIC 99999.
05 WS-7-BYTE-DISPLAY REDEFINES WS-7-BYTE-REFORMAT
PIC X(8).

so when i move as below
I am moving ws-y to ws-7-fld
The value in Ws-7-fld is 00.11212 actually should be 01.1212

Can anyone please suggest me the solution please

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

Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Fri Sep 25, 2009 2:46 am    Post subject:
Reply with quote

you've lost me..

do some research on PICIN / PICOUT of BMS basic mapping support.

That might help you out.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Sep 25, 2009 2:57 am    Post subject:
Reply with quote

In addition to Earl's suggestion, consider using the NUMVAL intrinsic function.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Sep 25, 2009 3:19 am    Post subject:
Reply with quote

Hello,

Just a caution. . .

NUMVAL works great if the input is known to be valid. When users enter data on a screen, the data is known to be questionable. . .

If invalid data is processed by NUMVAL an abend results.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Sep 25, 2009 3:23 am    Post subject:
Reply with quote

Thanks Dick. I should have mentioned that most, if not all, of the intrinsic functions do not validate the input.
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 OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am
No new posts Reformat data into a sensible format prino DFSORT/ICETOOL 14 Tue Jan 19, 2016 6:00 pm
No new posts Reformat for specific values of a field vnktrrd DFSORT/ICETOOL 6 Wed Oct 07, 2015 1:04 pm
No new posts IFTHEN to reformat the matching and n... maki_psg SYNCSORT 6 Fri Sep 25, 2015 2:53 pm
No new posts DFSORT with Reformat Options jegan_selvan DFSORT/ICETOOL 4 Tue Oct 14, 2014 4:52 pm


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