|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Conversion of flat file to Mainframe file
Hi guys,
I have a flat file created by ETL tool. Now the flat file has 4 columns. 1st column is a Character(17), 2nd Column Character(4), 3rd column is a decimal column and 4th column is also a decimal column. I have to convert this file into a Mainframe file in the following format. column1 x(17) column2 x(4) column3 S9(comp) column4 S9(comp-3) Is it possible to convert a text file to a mainframe (readable) format file in unix. Cheers!!!!! |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
What is (comp) and (comp-3)?
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Sorry my bad.
Its S9(4) comp and S9(4) comp-3 |
|
#4
|
|||
|
|||
|
Without consistent samples of input and desired output files, it's difficult to guess correctly, but you could try: Code:
$ awk '{printf "%s%s%4.2f%4.2f", $1, $2, $3, $4}' fileHopefully your mainframe does not need a char set conversion! |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Would help to have input and output file examples.
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vb file from UNIX to mainframe | poova | UNIX for Dummies Questions & Answers | 1 | 01-18-2013 10:27 AM |
| Searching for Log / Bad file and Reading and writing to a flat file | mlpathir | Shell Programming and Scripting | 3 | 10-03-2010 06:01 PM |
| Flat file to csv conversion | p1_ben | Shell Programming and Scripting | 6 | 03-19-2010 02:14 PM |
| compare XML/flat file with UNIX file system structure | shafi2all | Programming | 6 | 08-15-2008 02:15 AM |
| Flat File Conversion Format | Loobian | UNIX for Advanced & Expert Users | 4 | 05-02-2006 07:05 AM |
|
|