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

if the number is less than 8 i need to suffix the zeros for


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
EnjoyMF

New User


Joined: 27 May 2005
Posts: 88

PostPosted: Mon Aug 29, 2005 4:14 pm
Reply with quote

Hi all

i have a alphanumeric field of length 8,
the input to this field is a account number and the account number can vary from 4 to 8 length
if the number is less than 8 i need to suffix the zeros for them

example
(B - spaces ) 1234BBBB then output should be 00001234
12345BBB then output should be 00012345

plz can any one sugguest me a simple logic for that

Regards
prasad
Back to top
View user's profile Send private message
gowtham_srgp

New User


Joined: 09 Jun 2005
Posts: 38

PostPosted: Mon Aug 29, 2005 4:46 pm
Reply with quote

EnjoyMF wrote:
Hi all

i have a alphanumeric field of length 8,
the input to this field is a account number and the account number can vary from 4 to 8 length
if the number is less than 8 i need to suffix the zeros for them

example
(B - spaces ) 1234BBBB then output should be 00001234
12345BBB then output should be 00012345

plz can any one sugguest me a simple logic for that

Regards
prasad



hai. you get the alphanumeric data and move it to a numeric identifier. the leading zeroes will be present. if there happens to be a alphaetic entry for the account number, there can be a problem of soc-7...


corrections welcomed.......


gowtham
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Aug 31, 2005 5:16 am
Reply with quote

Hi Prasad,

When asking for logic help you should show us what you have tried and what probs you encountered.

Then we can make suggestions that you can try and report back on your progress.

Asking us to solve your problem for you is not the way to go. You'll learn a lot more if you try to solve it yourself.
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 Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top