Greek data sort

Tring to sort Greek characters. Initially in the popup according to tax number in the sequential order it is displaying. When F10 function key is pressed in the popup. Greek characters need to be sorted in the alphabetical order. System CCSID is 875. Please find an attached document for more details.
Please give me detail about this issue.  
Tax-office-number-detail.xls
Expecting-Tax-office-number-need.xls
karthikgayathriAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
daveslaterConnect With a Mentor Commented:

If you have the source code it would be quite simple;
there are varios methods:

Dynamic SQL,
File over rides in the "F" specification

Failing that you could write a new program, again this would be quite easy if you know the input/output parameters.

Dave


0
 
Gary PattersonConnect With a Mentor VP Technology / Senior Consultant Commented:
How does the program perform the sort?  Multiple logical files?  SQL? SORTA?  Work file with FMTDTA?  Each of these mechanisms has a way to control the sort order.  For example, the RPG III SORTA opcode depends on the CRTRPGPGM SRTSEQ and LANGID parameters.

- Gary Patterson
0
 
karthikgayathriAuthor Commented:
Here in this case we have used logical file to sort the data(Big program is used) .  For English it used to work good. Can u please provide me a sample code for this scenario.
Current scenario:
Initially in the popup using postcode(Tax office number) the data will be sorted. When F10 function key is pressed using Tax office description the data should be sorted in an alphabetical order.Using logical file

Expected result:
When First time F10 function key is pressed in the popup the data need to be sorted according to the tax office description. Once again F10 key is pressed then it should display sort by tax office number.

 
We are using RPGLE.


 
0
 
Gary PattersonConnect With a Mentor VP Technology / Senior Consultant Commented:
When you create a logical file the CRTLF SRTSEQ an LANGID parameters control the sort sequence of the index.

If you want to continue using logical files, you will need to create one logical for each language with the correct SRTSEQ and LANGID parameters for each different sort order, and then pick the correct logical file in your program at run-time.  Your program will have to know what language the user is using (from the job, usually), and then select the logical that matches that language.

This code is not dynamic, and you'll have to modify the program and add logicals each time a new language is added.

I prefer using a dynamic option that works for any language:

Modify the program to sort in an array instead of using a logical.  IF you set your SRTSEQ(*JOBRUN) and LANGID(*JOBRUN) when you create the program, it will sort based on the RUNTIME user's job language settings.

Modify teh program to use embedded SQL to sort the data.  Same rules apply as with an array.  Use the SRTSEQ(*JOBRUN) and LANGID(*JOBRUN) when you compile to cause SQL to sort based on the runtime user's job LANGID setting.

- Gary Patterson
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.