Convert variable blocked file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Convert variable blocked file
# 1  
Old 02-18-2013
Convert variable blocked file

Dear All,

I am receiving Fixed blocked file from AS/400 system to my unix box. Could you please advise us how to convert this fix blocked file to variable blocked file. Do we have any command in Unixt or program.

I am new to this Unix system

Thanks & Regards,
Colam
# 2  
Old 02-18-2013
Fixed block means no line feeds or other record separatorsn, just N bytes. It may have binary data, too. Variable comes in many forms. New-line is not the only record separator, and field separators vary too: comma, tab, pipe, ??? never mind XML with its hierarchy of container/leaf elements and their attributes. Fields in fixed block are also usually by length (they can be delimited and then padded, but that is sort of a mix of flavors), in which case you need to know the layout. The file is easily handled as an array of C/C++ struct that you can mmap() and then everything is field delimited by length and record count. You might need a union for the layout of headers and trailers, and any variant record types in the file.

Look it over in a tool that is not too line feed oriented, like pg, more, od.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read Variable From Fille And Convert it to Integer

I read 3 variables from from Inputfile.txt the third one "startnumber" is a number when i compare it with 9 ($startnumber -le 9) it give's me a "unary operator expected", i know that -le is for number comparison. What i need is to convert $startnumber to integer (i have try to do it with expr but... (8 Replies)
Discussion started by: marios
8 Replies

2. Shell Programming and Scripting

Blocked while Redirecting the syslog messages to a pipe in the rc script file

Hi All, I am newbie to linux and i am trying to re-direct the syslog messages to a pipe. I have modified the syslog.conf file accordingly and have written an rc script to read from the pipe and put them to a file. I was able to get the log messages to the file but my system is getting ... (1 Reply)
Discussion started by: anilmurala
1 Replies

3. Shell Programming and Scripting

convert hex to binary and send to variable

Folks, can anyone help with a script to convert hex to binary digits, and break the 32 bit binary into packs of 4 and send them to 8 different variables.Any help is sincerely appreciated. Thanks venu Its in korn shell...... (24 Replies)
Discussion started by: venu
24 Replies

4. UNIX for Dummies Questions & Answers

Convert a tab delimited/variable length file to fixed length file

Hi, all. I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file: 10200002<tab>US$ COM<tab>16/12/2008<tab>2,3775<tab>2,3783 19300978<tab>EURO<tab>16/12/2008<tab>3,28523<tab>3,28657 And this is the expected... (2 Replies)
Discussion started by: Everton_Silveir
2 Replies

5. Shell Programming and Scripting

convert date variable to doy variable

Hello: I have a script that requires the use of DOY (as a variable) instead of YY/MM/DD. I already obtained these parameters from downloaded files and stored them as variables (i.e. $day, $month, $year). Is there any simple script that I could incorporate in mine to do this job? Regards, ... (8 Replies)
Discussion started by: aabrego
8 Replies

6. Shell Programming and Scripting

Convert Variable file to fixed file.

I have a set of variable date log files /tmp/test/test1_<YYYYMMDD>_A.log /tmp/test/test2_<YYYYMMDD>_B.log /tmp/test/test3_<YYYYMMDD>_C.log /tmp/test/test4_<YYYYMMDD>_D.log /tmp/test/test5_<YYYYMMDD>_E.log which should be converted (should have content of all the above listed files) into... (9 Replies)
Discussion started by: abhi9845
9 Replies

7. UNIX for Dummies Questions & Answers

Convert Variable file to fixed file.

I have a set of variable date log files /tmp/test/test1_<YYYYMMDD>_A.log /tmp/test/test2_<YYYYMMDD>_B.log /tmp/test/test3_<YYYYMMDD>_C.log /tmp/test/test4_<YYYYMMDD>_D.log /tmp/test/test5_<YYYYMMDD>_E.log which should be converted (should have content of all the above listed files) into... (1 Reply)
Discussion started by: abhi9845
1 Replies

8. Shell Programming and Scripting

convert variable content to array

Hi All, I have a variable in a shell script which holds let say n paarmeteres with space separate them : $var = par1 par2 par3 par4 parn; so if I print this variable this is what I'll see: par1 par2 par3 par4 parn I need to insert each parameter to an array , so I can go over on each... (3 Replies)
Discussion started by: Alalush
3 Replies

9. Shell Programming and Scripting

How do you take what a user types in and convert it into a variable to be used

I am a newbie to programming on the unix Command Line*, and was wondering how you take what a user types in and convert it into a variable to be used in the script? *I always used it for file editing, but nothing more. Then I began to use BBedit. :confused: (1 Reply)
Discussion started by: signebedi
1 Replies

10. IP Networking

BitTorrent port 6969 blocked... how to get around the blocked port

Due to the massive Upload speeds killing .... or overstressing our schools network...... my school has blocked port 6969 (the most common BitTorrent port). So I cant connect to the tracker anymore, in other words no more downloading from school :( Does anyone know how I can get around the ports... (1 Reply)
Discussion started by: PenguinDevil
1 Replies
Login or Register to Ask a Question