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
 

 

00000050... i want to extract 50 out of this..

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jagadeesanm87

New User


Joined: 20 Jan 2011
Posts: 14
Location: Mumbai, India

PostPosted: Sat Mar 05, 2011 1:53 pm    Post subject: 00000050... i want to extract 50 out of this..
Reply with quote

Hello every one

Actually i am having numeric value 00000050 getting stored in some variable. Now my CICS screen have two field spaces only to display this. That is i want 50 to get display on my CICS screen. variable used to display for my cics screen is X(02) as shown below

10 WS-REASSIGNED-TIER-NUMBER PIC X(02).


If this would be Charachter string then it was not a problem i would have extracted it using substring and display it on my screen... Since this being Numeric values i cant use Substring also..

Can Anyone please let me know how to extract this 50. Its Urgent.


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

jagadeesanm87

New User


Joined: 20 Jan 2011
Posts: 14
Location: Mumbai, India

PostPosted: Sat Mar 05, 2011 2:02 pm    Post subject: Reply to: 00000050... i want to extract 50 out of this..
Reply with quote

000000050 is a S9(9) comp.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Sat Mar 05, 2011 4:54 pm    Post subject:
Reply with quote

Move the COMP variable to a USAGE DISPLAY variable, then use redefines or reference modification to move the last 2 characters to the field.
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Tue Mar 08, 2011 1:37 am    Post subject: Reply to: 00000050... i want to extract 50 out of this..
Reply with quote

Hi Bob, Can we redefine this comp usage to display usage variable?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Mar 08, 2011 1:50 am    Post subject: Reply to: 00000050... i want to extract 50 out of this..
Reply with quote

Actually, his name is Robert.

If this value is decimal 50 as a binary-fword, then you can't redefine it as display numeric, because internally it would equal X'00000032'. Just move it to a PIC 9(02) WS field (the compiler with perform the conversion) and then move this to WS-REASSIGNED-TIER-NUMBER and you're done.

Bill
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Sort Logic to extract data scorp_rahul23 DFSORT/ICETOOL 13 Tue Mar 01, 2016 1:22 am
No new posts how to extract the member name ? jackzhang75 CLIST & REXX 2 Wed Feb 17, 2016 9:21 pm


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