Solved

Greek data sort

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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
#Citrix #POC #XenDesktop #vCenter #VMware #ESX
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.
Suggested Courses

617 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