Hi mohd dalib,
to my understanding from your postings,
firstly i take a variable
string1 pic x(10) value '0123456789abcdefghijklmnopqrstuvwxyz'.
and second variable
temp1 pic x.
now variable temp contains any value that is between '0---9a--------z' that is in variable string1.
now i want to increment the value of variable temp1 just one.
1. you have a string of characters '0123456789abcdefghijklmnopqrstuvwxyz' in a variable STRING-1 [it should be 10+26= 36 chars long, so use pic x(36)]
2. You have another variable TEMP-1 [pic x(1)] which has a character that needs to be searched in STRING-1
3. using Search criteria, you want to find the existing position of character in TEMP-1 in STRING-1 and get the next character in sequence into TEMP-1
4. use this for futher manipulations
Hope this is what you are expecting.
if my understand about your requirement is correct, as suggested by Dick, use the following pseudocode
1. Define
01 ORIG-STRING.
05 STRING-1 PIC X(36).
05 STRING-2 REDEFINES STRING-1 PIC X(1) OCCURS 36 TIMES INDEXED BY INDX1.
01 TEMP-1 PIC X(1) value 'a'.
the indentation 01 and 05 is not coming correctly in this editor so use appropriately
2. MOVE '0123456789abcdefghijklmnopqrstuvwxyz' TO STRING-1.
3. SEARCH STRING-2 using TEMP-1. The index will be placed at the location of the character found.
4. SET INDX1 UP BY 1 and MOVE STRING-2(INDX1) TO TEMP-1 to get the next character in the STRING-1
Hope this helps...
let me know if you need any other help..