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

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Mar 05, 2011 4:54 pm
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Mar 08, 2011 1:50 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts optim extract file - SAS DB2 2
No new posts How to extract the data for current y... DFSORT/ICETOOL 8
No new posts Extract record using 2 input file int... JCL & VSAM 2
No new posts Extract all the TWS scheduler informa... IBM Tools 1
Search our Forums:

Back to Top