Create File with specific Length


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Create File with specific Length
# 1  
Old 10-17-2011
Create File with specific Length

We have utility running on Unix which generates Files with records greater than 32760 , (max supported by Mainframe) .Our requirement is to transfer is file to Mainframe .When we ftp the in binary format it automatically wraps it up..so we are good there...
But now we need to zip and send the file , In such case the wraping doesn't happen and the data gets truncated while unzipping.

So is there a way to unzip without truncating data (We use pkzip on mainframe)
Is there a way to define the length of a File in Unix??our utility can wrap the output up..
# 2  
Old 10-17-2011
Don't know about the mainframe, but have you checked out the fold utility on unix? See Man Page for fold (POSIX Section 1) - The UNIX and Linux Forums . You could use fold on your file before zipping it.
# 3  
Old 10-17-2011
The data is in binary and inclued images , so if we fold by words still the length exceeds..if we do it by bytes, data doesn't get structured properly and gives errors down the line...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash to create sub directories from specific file extension

In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. Programming

JAVA code to create file in Linux with specific permission

Hi All, I'm looking for JAVA code to create file in Linux with specific permission File should be created and saved in Linux in this path \opt\sys\doc by Java with this permission 764 Anyone can help to provide this Java code (3 Replies)
Discussion started by: AbuAliiiiiiiiii
3 Replies

3. Shell Programming and Scripting

Create a new file from another file with lines begins with a specific string

Hi, I have a file with below format myfile.txt aa aa1 aa2 qq aa4 ghs aa6 bbc gdf I m looking to create a file where lines begins with aa. myfile1.txt aa aa1 aa2 (4 Replies)
Discussion started by: Litu1988
4 Replies

4. Shell Programming and Scripting

Deleting lines in a fixed length file where there is a word at specific location

I have a big file having 100 K lines. I have to read each line and see at 356 character position whethere there is a word "W" in it. If it is their then don't delete the line otherwise delete it. There are two lines as one Header and one trailer which should remain same. Can somebody... (5 Replies)
Discussion started by: mohit kanoongo
5 Replies

5. Shell Programming and Scripting

Flat file-make field length equal to header length

Hello Everyone, I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table. Input Data- ------ ------------------------ ---- ----------------- WFI001 Xxxxxx Control Work Item A Number of Records ------ ------------------------... (5 Replies)
Discussion started by: sonali.s.more
5 Replies

6. Shell Programming and Scripting

Cutting rows at specific length

Hi, i have a file containing nrows and 3cols. i want to cut it in specific length and save output to individual files. 1 2 3 4 5 6 5 8 9 10 11 12 13 14 15 16 17 18 i need to cut the file say every 2 rows and save it in individual file. 01.dat contains 1 2 3 4 5 6 02.dat 7 8 9... (10 Replies)
Discussion started by: ida1215
10 Replies

7. Shell Programming and Scripting

Need help in writing a script to create a new text file with specific data from existing two files

Hi, I have two text files. Need to create a third text file extracting specific data from first two existing files.. Text File 1: Format contains: SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010 some text ............so on...and somwhere text like: Record 1:... (1 Reply)
Discussion started by: shashi143ibm
1 Replies

8. 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

9. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies

10. Shell Programming and Scripting

Create path which has length=1023.

Hi, Please help me.. PATH_MAX=1023 I need output as below: /mansa/filesssssssssssssssssssssssssssssssssssssssss Please send me code in ksh shell script.. while ] ; do done Thanks, Mansa (2 Replies)
Discussion started by: mansa
2 Replies
Login or Register to Ask a Question