Sponsored Content
Full Discussion: How AS 400 sorting data?
Top Forums Shell Programming and Scripting How AS 400 sorting data? Post 303033996 by MadeInGermany on Tuesday 16th of April 2019 08:42:55 AM
Old 04-16-2019
"collating sequence" is the key!
While most language (locale) settings in Unix are based on the ASCII sequence (numbers before characters), IBM seems to stick to the EBCDIC sequence (numbers after characters).
Maybe it is tunable? Search for "as400 how to set collating sequence"
These 3 Users Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting blocks of data

Hello all, Below is what I am trying to accomplish: I have a file that looks like this /* ----------------- xxxx.y_abcd_00000050 ----------------- */ jdghjghkla sadgsdags asdgsdgasd asdgsagasdg /* ----------------- xxxx.y_abcd_00000055 ----------------- */ sdgsdg sdgxcvzxcbv... (8 Replies)
Discussion started by: alfredo123
8 Replies

2. Solaris

apache ErrorDocument 400 /cgi-bin/400.cgi

Hi All, Sorry if the question is trivial for you but, I am new to Apache (2.0.63) and am trying to figure out how to display my 400.cgi. Here is what I have in httpd.conf servername testing DocumentRoot "/usr/local/apache2/htdocs" ErrorDocument 400 /cgi-bin/badrequest-400.cgi Here is... (0 Replies)
Discussion started by: afadaghi
0 Replies

3. UNIX for Dummies Questions & Answers

sorting data from who by IP

Hello. I have an RS/6000 running AIX 4 and I need to be able to see if there are any users that are logged on more than once from the same terminal so I can kick them off to make room for other terminals. 64 connections is the limit. Currently I am doing this: who | more and then manually... (11 Replies)
Discussion started by: raidzero
11 Replies

4. Shell Programming and Scripting

PERL data - sorting

Hello, I have a page where multiple fields and their values are displayed. But I am able to sort only a few fields. When I looked into the issue, it is seen that the for each row of info , an unique id is generated and id.txt is generated and saved. Only those fields which are inside that id.txt... (3 Replies)
Discussion started by: eagercyber
3 Replies

5. UNIX for Dummies Questions & Answers

Sorting data from a to z

Hi, Let's say I have these 3 columns; NGC1234 6 9 SL899 4 1 NGC1075 8 3 SL709 5 2 And I want to sort the data according to the first column (from a to z) like having them as: NGC1075 8 3 NGC1234 6 9 SL709 5 2 SL899 4 1 Can that be done... (2 Replies)
Discussion started by: cosmologist
2 Replies

6. UNIX for Dummies Questions & Answers

Sorting data

Hello guys. I need help figuring this one out. It's probably really easy. Thanks in advance! I have a file say for example containing this: Rice Food Carrots Food Beans Food Plates Kitchen Fork Kitchen Knives Kitchen I need: Food Rice, Carrots, Beans Kitchen Plates, Fork,... (7 Replies)
Discussion started by: visuelz
7 Replies

7. AIX

Extract data from an AS/400 tape

Hello, we received an IBM data cartridge with some data on it. It is a backup of an old IBM AS400 machine that had gone for good some years ago. I am able to extract data from this tape by using dd on a LINUX system: Analysing the received file with forensic software (Xways, haven't tried Encase... (4 Replies)
Discussion started by: mindmachine
4 Replies

8. UNIX for Dummies Questions & Answers

Help with Data Sorting

Hi All, I have a long list made of 4 columns containing entries such as the following example: a b c d 0 0 0 0 1 2 1 2 2 5 3 4 3 8 4 6 4 10 9 8 5 15 8 10So the top row is the header and I need to arrange the data in a way as to... (11 Replies)
Discussion started by: pawannoel
11 Replies

9. Shell Programming and Scripting

Sorting the Data

My actual data looks like below i have given only format. i can't give exact data format of my requirement due to some reasons. I this set of data lines about 5000 I need to come up with information in below exact format of my data set : Line<space>Number1<space>"somedata":... (1 Reply)
Discussion started by: ckaramsetty
1 Replies

10. Shell Programming and Scripting

Sorting the data with date

Hi, PFB the data: C_Random_130417 Java_Random_130518 Perl_Random_120519 Perl_Random_120528 so the values are ending with year,i.e.,130417 i want to sort the values with date. i want the output like this: Perl_Random_120519 Perl_Random_120528 C_Random_130417 Java_Random_130518 can... (5 Replies)
Discussion started by: arindam guha
5 Replies
COLLDEF(1)						    BSD General Commands Manual 						COLLDEF(1)

NAME
colldef -- convert collation sequence source definition SYNOPSIS
colldef [-I map_dir] [-o out_file] [filename] DESCRIPTION
The colldef utility converts a collation sequence source definition into a format usable by the strxfrm() and strcoll() functions. It is used to define the many ways in which strings can be ordered and collated. The strxfrm() function transforms its first argument and places the result in its second argument. The transformed string is such that it can be correctly ordered with other transformed strings by using strcmp(), strncmp(), or memcmp(). The strcoll() function transforms its arguments and does a comparison. The colldef utility reads the collation sequence source definition from the standard input and stores the converted definition in filename. The output file produced contains the database with collating sequence information in a form usable by system commands and routines. The following options are available: -I map_dir Set directory name where charmap files can be found, current directory by default. -o out_file Set output file name, LC_COLLATE by default. The collation sequence definition specifies a set of collating elements and the rules defining how strings containing these should be ordered. This is most useful for different language definitions. The specification file can consist of three statements: charmap, substitute and order. Of these, only the order statement is required. When charmap or substitute is supplied, these statements must be ordered as above. Any statements after the order statement are ignored. Lines in the specification file beginning with a '#' are treated as comments and are ignored. Blank lines are also ignored. charmap charmapfile Charmap defines where a mapping of the character and collating element symbols to the actual character encoding can be found. The format of charmapfile is shown below. Symbol names are separated from their values by TAB or SPACE characters. Symbol-value can be specified in a hexadecimal (x??) or octal (???) representation, and can be only one character in length. symbol-name1 symbol-value1 symbol-name2 symbol-value2 ... Symbol names cannot be specified in substitute fields. The charmap statement is optional. substitute "symbol" with "repl_string" The substitute statement substitutes the character symbol with the string repl_string. Symbol names cannot be specified in repl_string field. The substitute statement is optional. order order_list Order_list is a list of symbols, separated by semi colons, that defines the collating sequence. The special symbol ... specifies, in a short-hand form, symbols that are sequential in machine code order. An order list element can be represented in any one of the following ways: o The symbol itself (for example, a for the lower-case letter a). o The symbol in octal representation (for example, 141 for the letter a). o The symbol in hexadecimal representation (for example, x61 for the letter a). o The symbol name as defined in the charmap file (for example, <letterA> for letterA 23 record in charmapfile). If character map name have > character, it must be escaped as />, single / must be escaped as //. o Symbols a, , f, , , v are permitted in its usual C-language meaning. o The symbol chain (for example: abc, <letterA><letterB>c, xf1bxf2) o The symbol range (for example, a;...;z). o Comma-separated symbols, ranges and chains enclosed in parenthesis (for example ( sym1, sym2, ... )) are assigned the same primary order- ing but different secondary ordering. o Comma-separated symbols, ranges and chains enclosed in curly brackets (for example { sym1, sym2, ... }) are assigned the same primary ordering only. The backslash character is used for continuation. In this case, no characters are permitted after the backslash character. DIAGNOSTICS
The colldef utility exits with the following values: 0 No errors were found and the output was successfully created. !=0 Errors were found. FILES
/usr/share/locale/<language>/LC_COLLATE The standard shared location for collation orders under the locale <language>. SEE ALSO
mklocale(1), setlocale(3), strcoll(3), strxfrm(3) BSD
January 27, 1995 BSD
All times are GMT -4. The time now is 02:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy