Solved

Greek data sort

Posted on 2009-05-14
4
677 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 35

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 35

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

756 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