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
 

 

Prefixing Zeroes to Alphanumeric

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

Active User


Joined: 02 Oct 2008
Posts: 151
Location: India

PostPosted: Wed Oct 27, 2010 9:58 pm    Post subject: Prefixing Zeroes to Alphanumeric
Reply with quote

Hi All,

I will be entering the amount values in the screen and need to edit the entered amount.

Initially all the fields in the CICS screen will be '____' [PIC X(4)]. So the user can enter the amount as 10 or 11 or 123, 1234 etc.. Then I will do numeric check in the COBOL prgoram. If the entered amount is 12, it will be coming to the program as 12__
Is there any way, I can edit the program and make it as 0012 ?

Similarly, the entered value '10' in screen will be 10__ but need to change it as 0010 in the program.
Similarly the value '1' can be entered as ___1 and we need to make it as 0001 (I think this case can be checked using INSPECT variable REPLACING ALL '_' BY ZEROES after checking for leading '-').

Please help me.

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

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7995
Location: Bellevue, IA

PostPosted: Wed Oct 27, 2010 10:32 pm    Post subject:
Reply with quote

Why not use EXEC CICS BIF DEEDIT?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Oct 27, 2010 10:41 pm    Post subject:
Reply with quote

why Pic x(4) and not Pic 9(4)?????
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 151
Location: India

PostPosted: Wed Oct 27, 2010 10:56 pm    Post subject: Reply to: Prefixing Zeroes to Alphanumeric
Reply with quote

Thanks Robert for the suggestion. It worked.

@ Dbz - I have used X(4) since it is defined as X(4) in map variable.

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7995
Location: Bellevue, IA

PostPosted: Wed Oct 27, 2010 11:15 pm    Post subject:
Reply with quote

Glad to hear it works! icon_biggrin.gif
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
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am
No new posts To determine the range on a Alphanume... Prasanth Kumar COBOL Programming 3 Mon Feb 15, 2016 9:35 am


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