Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8198
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: 2504
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 Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts How to Extract BMS Marco Source from ... Howard Hinman CICS 5 Tue Oct 31, 2017 11:13 pm
No new posts Spool Extract for Z /os 1.04 version Khadhar Basha CLIST & REXX 3 Thu Sep 28, 2017 3:14 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us