Sponsored Content
Top Forums Shell Programming and Scripting EBCDIC Format to Normal String Post 302602223 by koti_rama on Sunday 26th of February 2012 11:47:58 PM
Old 02-27-2012
EBCDIC Format to Normal String

Hi,
I have EBCDIC format file and i wold like to convert normal string(user readable) in unix .
The source having the binary IBM file format
Sample Source Format:

Code:
נפנסנס@@@@@@@@@@@@@@נסֲננפנסנס@@@@@@@@@@@@@@נס׳ננפנסנס@@@@@@@@@@@@@@נקֲננפנסנס@@@@@@@@@@@@@@נק׳ננפנסנס@@@@@@@@@@@@@@נשֲננפנסנס@@@@@@@@@@@@@@נש׳ננפנסנס@@@@@@@@@@@@@@סנֲננפנסנס@@@@@@@@@@@@@@סנ׳ננפנסנע@@@@@@@@@@@@@@נסֲננפנסנע@@@@@@@@@@@@@@נס׳ננפנסנע@@@@@@@@@@@@@@נשֲננפנסנע@@@@@@@@@@@@@@נש׳ננפנסנע@@@@@@@@@@@@@@סנֲננפנסנע@@@@@@@@@@@@@@סנ׳ננפנסנף@@@@@@@@@@@@@@נסֲננפנסנף@@@@@@@@@@@@@@נס׳ננפנסנף@@@@@@@@@@@@@@נשֲננפנסנף@@@@@@@@@@@@@@נש׳ננפנסנף@@@@@@@@@@@@@@סנֲננפנסנף@@@@@@@@@@@@@@סנ׳ננפנסנפ@@@@@@@@@@@@@@נסֲננפנסנפ@@@@@@@@@@@@@@נס׳סנפנסנפ@@@@@@@@@@@@@@נפֲסנפנסנפ@@@@@@@@@@@@@@נפ׳סנפנסנפ@@@@@@@@@@@@@@נקֲננפנסנפ@@@@@@@@@@@@@@נק׳סנפנסנפ@@@@@@@@@@@@@@נשֲננפנסנפ@@@@@@@@@@@@@@נש׳סנפנסנפ@@@@@@@@@@@@@@סנֲננפנסנפ@@@@@@@@@@@@@@סנ׳סנפנסנץ@@@@@@@@@@@@@@נסֲננפנסנץ@@@@@@@@@@@@@@נס׳ננפנסנץ@@@@@@@@@@@@@@נשֲננפנסנץ@@@@@@@@@@@@@@נש׳ננפנסנץ@@@@@@@@@@@@@@סנֲננפנסנץ@@@@@@@@@@@@@@סנ׳ננפסעעס@@@@@@@@@@@@@@נס׳ננפסעעף@@@@@@@@@@@@@@נףֲננפסעעף@@@@@@@@@@@@@@נף׳ננפסעעף@@@@@@@@@@@@@@נסֲננפסעעף@@@@@@@@@@@@@@נס׳ננפסעעע@@@@@@@@@@@@@@נץ׳


I have write a code like the follwoing.
Code:

dd if=<SRCPATH>yyy.xxx.RB065 of=<SRCPATH>/output.csv ibs=800 cbs=80 conv=ascii,lcase;

Then the output file contains:
HTML Code:
040101              01B0040101              01P0040101              07B0040101  
            07P0040101              09B0040101              09P0040101          
    10B0040101              10P0040102              01B0040102              01P0
040102              09B0040102              09P0040102              10B0040102  
            10P0040103              01B0040103              01P0040103          
    09B0040103              09P0040103              10B0040103              10P0
But it not in user readable format
How to convert the EBDIC format to nomal sting in unix.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert Epoch time format to normal date time format in the same file

I have a file named "suspected" with series of line like these : {'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''} {'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies

2. Shell Programming and Scripting

write in ebcdic format

Hi - Is there a way to write the data in the ebcdic format. I mean I already have one file in the ebcdic format and I have to add a couple of rows to it in the ebcdic format. could any one please let me know how can I do that. (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies

3. Shell Programming and Scripting

format a string

Hello All, I have a file which appears as follows a,alpha,abc-xyz,123 b,beta,prq-jkl,543 c,gamma,xyz-mno,957 I have to extract the entire content, except for the data following "-" in the third column. Output should appear as follows. a,alpha,abc,123 b,beta,prq,543... (2 Replies)
Discussion started by: grajp002
2 Replies

4. Shell Programming and Scripting

format string output

I need to put the output of the ps -ef command into a string. echo'n that string must display the output similiar to how we see the output of ps -ef in commandline. This is the string message="this is the output of ps command\n\n `ps -ef`\n\n Output Complete" when I echo $message the... (11 Replies)
Discussion started by: Northpole
11 Replies

5. UNIX for Dummies Questions & Answers

Normal format and scientific combined data

hi guys, i have a data with a column of p value (normal format and scientific combined). i want to creat a subset of data which only contains p-value: data 1: p<10^7 data 2: p<0.01 how should i do it? many thanks! data looks like: rs7841347 128887490 1.695e-007 rs1241347 ... (4 Replies)
Discussion started by: forevertl
4 Replies

6. UNIX for Dummies Questions & Answers

Help! EBCDIC format to ASCII

Hi everyone, I have a 70MB EBCDIC file, with record length 102, block size 32742 and IBM standard label. I commanded dd if=input file of=outputfie ibs=32742 cbs=102 conv=ascii but I still don't get a viewable file under ASCII. Can anyone told me what's the problem? Do I need... (12 Replies)
Discussion started by: hrchl86
12 Replies

7. Shell Programming and Scripting

How to format String in ksh

Hi, I have 3 columns to display to target file and the display of the columns with specified position in target file. I have tried with printf command The Columns position like: Column1= 0 to 30 Column2=30 to 60 Column3=60 to 90 The source data: EMPNO,ENAME,SAL 1,11,100 2,22,200... (4 Replies)
Discussion started by: koti_rama
4 Replies

8. Shell Programming and Scripting

EBCDIC Format to ASCII

Hi, we have source file with EBCDIC format(Main Frame files) where we receving from source system. I would like to convert the EBCDIC format file to unix systemformat(ex: .csv,txt ) I have wrote script like: dd if=<SRCPATH>yyy.xxx.RB065 of=<SRCPATH>/output.csv ibs=800 cbs=80... (8 Replies)
Discussion started by: koti_rama
8 Replies

9. Shell Programming and Scripting

Normal text to table format

Hi, I am trying to show my list, from a simple list format to a table (row and column formatted table) Currently i have this format in my output (the formart it will always be like this ) >> first 3 lines must be on the same line aligned, and the next 3 shud be on 2nd line....: INT1:... (10 Replies)
Discussion started by: eboye
10 Replies

10. UNIX for Beginners Questions & Answers

Check if file is EBCDIC or ASCII format

So, i have this requirement where i need to check the file format, whether it's EBCDIC or ASCII, and based on format retrieve the information from that file: my file is: file1.txt-->this ebcdic file file2.txt-->ascii file i tried below code: file=file1.txt type="`file $file`" i get... (7 Replies)
Discussion started by: gnnsprapa
7 Replies
DtEditorFormat(library call)											      DtEditorFormat(library call)

NAME
DtEditorFormat -- format all or part of the contents of a DtEditor widget SYNOPSIS
#include <Dt/Editor.h> DtEditorErrorCode DtEditorFormat( Widget widget, DtEditorFormatSettings *formatSettings, unsigned int amountToFormat); DESCRIPTION
The DtEditorFormat function formats all or part of the contents of the DtEditor widget according to the current text format settings in the Format Settings dialog. These options specify which margins and alignments (left aligned, right aligned, justified or centered) are used. Optionally, alternative settings can be passed as an argument to DtEditorFormat in a data structure. This function formats either the paragraph containing the insertion cursor or the entire contents of the DtEditor widget, depending on the value of the amountToFormat argu- ment. The Format Settings dialog is displayed with DtEditorInvokeFormatDialog(3). For a complete description of formatting and the Format Set- tings dialog, see DtEditor. The widget argument specifies the editor widget ID. The formatSettings argument specifies left margin value, right margin value and the justification style. The LeftMargin and RightMargin fields of DtEditorFormatSettings must be zero or larger. The Alignment field can have a value of DtEDITOR_ALIGN_CENTER, DtEDI- TOR_ALIGN_JUSTIFY, DtEDITOR_ALIGN_LEFT or DtEDITOR_ALIGN_RIGHT. If the formatSettings argument is NULL, DtEditorFormat uses the last format settings specified in the Format Settings dialog. When the amountToFormat argument is set to DtEDITOR_FORMAT_ALL, it reformats all the text in the edit window. When this argument is set to DtEDITOR_PARAGRAPH, only the paragraph containing the insertion cursor is formatted. For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). For a complete definition of DtEditorFormatSettings, see Dt/Editor.h - DtEditor(5). RETURN VALUE
Upon successful completion, the DtEditorFormat function returns DtEDITOR_NO_ERRORS; otherwise, it returns one of the following values: DtEDITOR_NO_TMP_FILE The DtEditorFormat function cannot create two temporary files in the directory returned by tmpnam3S. DtEDITOR_ILLEGAL_SIZE The left or right margin values are negative. DtEDITOR_INVALID_RANGE The amountToFormat argument is not recognized. DtEDITOR_INVALID_TYPE The Alignment field is not recognized. SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorInvokeFormatDialog(3); tmpnam3S. DtEditorFormat(library call)
All times are GMT -4. The time now is 05:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy