Solved

Greek data sort

Posted on 2009-05-14
4
670 Views
Last Modified: 2013-12-06
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
0
Comment
Question by:karthikgayathri
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
daveslater earned 167 total points
ID: 24384282

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
 
LVL 34

Assisted Solution

by:Gary Patterson
Gary Patterson earned 333 total points
ID: 24387659
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
 

Author Comment

by:karthikgayathri
ID: 24393003
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
 
LVL 34

Assisted Solution

by:Gary Patterson
Gary Patterson earned 333 total points
ID: 24400114
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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now