MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help to generate a 3 byte unique alphanumeric code

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
eureka19
Beginner


Joined: 02 Oct 2005
Posts: 20
Topics: 9

PostPosted: Wed Mar 28, 2007 1:23 am    Post subject: Need help to generate a 3 byte unique alphanumeric code Reply with quote

Hi All,

We have a requirement, where in, we have to generate a 3 byte unique alphanumeric code using COBOL, based on the last code.
Say last code was 001, the next code should be 002 and so on till 999. Beyond 999, we would like to use combination of alphabets, special characters.

Pointers to any existing logic or any new ideas are welcome.

Thanks,
Eureka
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Wed Mar 28, 2007 4:08 am    Post subject: Reply with quote

eureka19,

1. define ws -num as 9(03) with an initial value of 001 and move this to x(03) variable
2. ADD 1 to ws-num and move to x(03) till you reach 999.
3 Now manipulate the x(03) value using special characters accordingly

kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group