Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

1.find most occurrences of a character.

for exm: input:aaabbbbdddddyyy
output: d 5 times
how can i get that?


Answer Posted / vipul dixit

With the help of %Scan built in function or Scan op-code we
can do this.
we should define a data structure and write like this way:-

DDs s
C Eval Ds = %Scan('d':Source:1).
It will fetch the position of the scanned character,and
after that we will count all the positions as DS elements.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of identifiers?

969


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1948


When it is desirable to describe files Internally?

1646


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

5059


can you debug ile rpg program using isdb?

1186


How Chain operation copies the record's data to the input buffer for the program?

1535


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

2942


How would display prime numbers using CL program?

6249


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

886


what is the procedure and explain about real time scenario.

1889


how does the rpg element work?

1133


What is ment by record level identifier?

1085


is this a rpg channel?

1118


what is the use of sflnxtchg?

1205


How can we know running job is batch or interactive?

1045