05-15-2009
This would be very difficult in shell but easy in a high level language such as Cobol (pic COMP-3).
Common sense says do the conversion on the Mainframe unless you have the tools on the unix server.
There is much variation in Packed Decimal which is further complicated if you need to generate EBCDIC on the unix server.
Binary-coded decimal - Wikipedia, the free encyclopedia
If it is really necessary to do the conversion on the unix server the blunt approach is with a conversion table, though you don't state data volumes or anything about the computers or software involved.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there a way with HP-UX Release 10.20 (but going to HP-UX 11) to convert a regular "text" file to a packed data format (such as is created by a Cobol program)? (2 Replies)
Discussion started by: HuskyJim
2 Replies
2. UNIX for Dummies Questions & Answers
How do we create a text file with COBOL "Packed Decimal" value in UNIX ? (1 Reply)
Discussion started by: gaddeg
1 Replies
3. UNIX for Advanced & Expert Users
Friends,
I've tried on solaris, but I could n't get ascii data
dd if=binaryinputfile bs=1 skip=3800 count=4 | od -t u4
output :
INDBU3:/usr/users/FTAMUSER/kk $
dd if=SMP20041006173649188151 bs=1 skip=3800 count=4 | od -t u4
4+0 records in
4+0 records out
0000000 0000000000
0000004... (4 Replies)
Discussion started by: krishna
4 Replies
4. UNIX for Dummies Questions & Answers
By using dd command in Unix one can convert EBCDIC file into ASCII. It fails when it comes to having packed decimals within the EBCDIC file. The resultant of it has garbage chars.
How can we have EBCDIC file convertedinto ASCII, which has packed decimal data in it?
Thanks in advance. (3 Replies)
Discussion started by: videsh77
3 Replies
5. Shell Programming and Scripting
Hi gurus,
I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies
6. Shell Programming and Scripting
Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL.
Regards,
Alok (1 Reply)
Discussion started by: aloktiwary
1 Replies
7. Shell Programming and Scripting
Hello,
I need an awk script to receive a variable that's an decimal value such as 009 or 031 and then convert this value to an ascii character to use as the FS (field separator for the input file).
For example,
009 should be converted to an ascii tab
031 should be converted to an ascii... (1 Reply)
Discussion started by: script_op2a
1 Replies
8. Shell Programming and Scripting
I have a input file which is EBCIDIC and it has packed decimals.
Can anyone help me to convert EBCIDIC file to ASCII(Need to convert even Packed decimal values also to normal format) (12 Replies)
Discussion started by: Anusha_Reddy
12 Replies
9. Programming
Hi ,
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
Discussion started by: greenworld123
1 Replies
10. Shell Programming and Scripting
Hi All,
I have an ascii file in which few columns are having hex values which i need to convert into ascii. Kindly suggest me what command can be used in unix shell scripting?
Thanks in Advance (2 Replies)
Discussion started by: HemaV
2 Replies
LEARN ABOUT SUNOS
intro_jfp
Intro_jfp(4) File Formats Intro_jfp(4)
NAME
Intro_jfp, intro_jfp - introduction to JFP file formats
DESCRIPTION
This section outlines the formats of JFP various files. The C structure declarations for the file formats are given where applicable. Usu-
ally, the headers containing these structure declarations can be found in the directories /usr/include or /usr/include/sys. For inclusion
in C language programs, however, the syntax #include <filename.h> or #include <sys/filename.h> should be used.
Because the operating system now allows the existence of multiple file system types, there are several instances of multiple manual pages
with the same name. These pages all display the name of the FSType to which they pertain, in the form name_fstype at the top of the page.
For example, fs_ufs.
LIST OF FILES
Name Description
Intro_jfp(4) introduction to JFP file formats
atok12wordlist(4) Text word file for ATOK12 dictionary utilitiy
css.conf(4) CS starting information file
jserverrc(4) Initialization file for Wnn6 Kana-Kanji conversion server
sdtudc_map(4) User defined character conversion map file
uumkey(4) Wnn6 Kana-Kanji conversion key binding definition file
uumrc(4) xjsi and uum initialization file
wnnenvrc(4) Wnn6 Kana-Kanji conversion dictionary/conversion parameter configuration file
wnnhosts(4) Wnn6 Kana-Kanji conversion server/dictionary lookup server access control file
wnn_2A_CTRL(4) Change input conversion mode definition table
wnn_2B_ROMKANA(4) Roman character Kana conversion definition table
wnn_automaton(4) Automaton
wnn_cvt_key_tbl(4) Kana-Kanji conversion front end processor (uum) key code conversion table file
wnn_cvt_xim_tbl(4) Key conversion table for xjsi
wnn_hinsi.data(4) Wnn6 part of speech administration file
wnn_mode(4) Mode definition table
wnn_serverdefs(4) Wnn6 Kana-Kanji conversion server connection parameter configuration file
wnn_ximrc(4) xjsi configuration file
SunOS 5.10 10 Jan 2003 Intro_jfp(4)