Solved

Greek data sort

Posted on 2009-05-14
4
671 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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

10 Experts available now in Live!

Get 1:1 Help Now