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 

Generate the alphanumeric numbers

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Tue Nov 30, 2010 9:17 am    Post subject: Generate the alphanumeric numbers Reply with quote

I need to generate the alpha-numberic numbers in the following way and write them to output file.

Code:

A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
B1
B2
B3
B4
B5
B6
B7
B8
B9
B0
.
.
.
Z1
Z2
Z3
Z4
Z5
Z6
Z7
Z8
Z9
Z0


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


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

PostPosted: Tue Nov 30, 2010 11:30 am    Post subject: Reply with quote

sivafdms,

The following DFSORT JCL will give you the desired results. The output will be 2 bytes and will have 260 records (26 alphabets and 10 records for each alphabet)

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                               
DUMMY RECORD                                                             
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                           
  OUTFIL REPEAT=260,                                         
  IFTHEN=(WHEN=INIT,BUILD=(SEQNUM,3,ZD)),           
  IFTHEN=(WHEN=GROUP,RECORDS=10,PUSH=(ID=2)),                 
  IFTHEN=(WHEN=INIT,                                         
  FINDREP=(INOUT=(C'01',C'A',C'02',C'B',C'03',C'C',           
                  C'04',C'D',C'05',C'E',C'06',C'F',           
                  C'07',C'G',C'08',C'H',C'09',C'I',           
                  C'10',C'J',C'11',C'K',C'12',C'L',           
                  C'13',C'M',C'14',C'N',C'15',C'O',           
                  C'16',C'P',C'17',C'Q',C'18',C'R',           
                  C'19',C'S',C'20',C'T',C'21',C'U',           
                  C'22',C'V',C'23',C'W',C'24',C'X',
                  C'25',C'Y',C'26',C'Z'),STARTPOS=1,DO=1)),
  IFTHEN=(WHEN=INIT,BUILD=(1,2))                           
//*

_________________
Kolusu
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 -> Utilities 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