Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Conversion of flat file to Mainframe file Post 302780737 by RudiC on Friday 15th of March 2013 04:05:14 AM
Old 03-15-2013
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}' file

Hopefully your mainframe does not need a char set conversion!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Flat File Conversion Format

Hi all, I've a flat file in this format: = " Record 1 Field1 -> XXXX Field2 -> 9558 Field3 -> 55AA Record 2 Field1 -> YYYY Field2 -> 12345 Field3 -> aa23 " And i want to convert it to (4 Replies)
Discussion started by: Loobian
4 Replies

2. Shell Programming and Scripting

Moving file from Mainframe to Unix

Hi I m an absolute dummy on UNIX, I m basically a SAP guy. but I require a file which is stored on the mainframe to be moved to Unix application server. I got the following script to do it from someone #! /usr/local/bin/move_prom REMOTE_HOST=158.52.246.30 # Hostname of the remote Mainframe... (2 Replies)
Discussion started by: satyaj_99
2 Replies

3. Shell Programming and Scripting

mainframe assembler file into Unix

Hi, I have received a mainframe file ( VSAM file ) . I would like to handle that file in Unix. i.e I would like to take the last record of the file. I have given wc -l <file_name> , it gives 0 lines. Even though It has some lines , it is not giving count exactly. When I gave file <file_name>... (1 Reply)
Discussion started by: thambi
1 Replies

4. Programming

compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies

5. Shell Programming and Scripting

Flat file to csv conversion

Hi Guy's can someone help me in converting the following I have a flat text file which has several thousand lines which I need to convert to a csv it's got a consistent format but basically want every time it hit's txt to create a new line with the subsequent lines comma delimited for example ... (6 Replies)
Discussion started by: p1_ben
6 Replies

6. Shell Programming and Scripting

Searching for Log / Bad file and Reading and writing to a flat file

Need to develop a unix shell script for the below requirement and I need your assistance: 1) search for file.log and file.bad file in a directory and read them 2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file 4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies

7. UNIX for Dummies Questions & Answers

Vb file from UNIX to mainframe

Hi Everyone, Do I need to provide record length as Record length + 4 when I'm transferring a variable block files from unix to mainframe through ftp? For example, I have a file in unix (ebcidic converted) with maximum record length of 100. This works correctly, quote... (1 Reply)
Discussion started by: poova
1 Replies

8. Shell Programming and Scripting

awk Flat File Conversion Script

In awk how would I flatten input.txt to output.txt? Input: givenname: Darth sn: Vadar mail: d.vadar@deathstar.com uid: dv12345 orclguid: 1234567890 givenname: Carlito sn: Brigante mail: c.brigante@paradise.com uid: cb12345 orclguid: 2134567890 Output: ... (3 Replies)
Discussion started by: u20sr
3 Replies

9. Shell Programming and Scripting

Downloading file from mainframe to UNIX

Hi All , I need a help regarding file ftp ing from mainframe to unix.Our source file is mainframe file.I need to download the mainframe file to local unix server through unix script.If anyone can help me how we can do it through unix script ,it will be really helpful.Thanks. (7 Replies)
Discussion started by: STCET22
7 Replies

10. Shell Programming and Scripting

Mainframe SAS JCL to Korn Shell script conversion

Hi All, Please help me to the conversion of Mainframe SAS JCL to korn Unix script. Please share the example from SAS JCL to Korn Unix Script. It be really helpful. Please share the online source also so I can look into it. Thanks, Abhishek (5 Replies)
Discussion started by: Abhishek Tyagi
5 Replies
euctoibmj(1)							   User Commands						      euctoibmj(1)

NAME
euctoibmj, ibmjtoeuc - Code conversion between Japanese EUC and IBM-Japanese SYNOPSIS
euctoibmj [-t] [-u code] [-U] [filename...] ibmjtoeuc [-u code] [-U] [filename...] AVAILABILITY
SUNWjfpu DESCRIPTION
euctoibmj converts the contents of the specified filenames from ASCII/ Japanese EUC to EBCDIC/IBM-Japanese. ibmjtoeuc converts the con- tents of the specified filenames from EBCDIC/IBM-Japanese to ASCII/ Japanese EUC. The both commands write the resultant code to stdout. If filename is not given, input characters are read from the standard input. For Japanese language handling, the euctoibmj/ibmjtoeucj pair of commands provide conversion only between the two code standards. Code con- version among Japanese EUC, JIS, and PC kanji are supported by another set of commands, jistoeuc(1) family or iconv(1). OPTIONS
-u code With this option specified, characters in one code set that do not have corresponding characters in the other are mapped to the code given in four-digit hexadecimal HOST CODE of IBM Japanese (for euctoibmj) or in four-digit JIS Ku-Ten code (for ibmjtoeuc). Without this option, such characters are mapped to HOST CODE 4040 (for euctoibmj) or JIS Ku-Ten code 0101 (for ibmjtoeuc). -U The output is not buffered (The default is buffered output). -t With this option specified, euctoibmj translates Half-Size Katakana (Code Set 2) in Japanese EUC to the corresponding characters in Code Set 1 prior to conversion. Without this option, Code Set 2 characters in Japanese EUC are processed to the illegal charac- ter. ENVIRONMENT VARIABLES
The environment variables LC_CTYPE and LANG control the character classification throughout these commands. For euctoibmj and ibmjtoeuc to work correctly, one or both of the environment variables must be set to ja or an equivalent locale. On entry to these commands, these envi- ronment variables are checked in the following order: LC_CTYPE and LANG. When a valid value is found, remaining environment variables for character classification are ignored. FILES
/usr/lib/jcodetables/ibmj-euc Code conversion table for IBM Japanese. SEE ALSO
iconv(1), jistoeuc(1), iconv_ja(5) DIAGNOSTICS
unexpected data encountered in input. Illegal character code is found in input file. BUGS
The ASCII/EBCDIC conversion table are taken from the 256 character standard in the CACM Nov, 1968. The conversion, while less blessed as a standard, corresponds better to certain IBM print train convertions. There is no universal solution. The Japanese EUC/IBM Japanese conversion table is based on the IBM Kanji codebook (4th edition - September 1987), JIS X 0201, and JIS X 0208-1983. If JIS X 0212 caracter set is specified as input, euctoibmj can not support the conversion correctly. SunOS 5.10 10 Jan 2003 euctoibmj(1)
All times are GMT -4. The time now is 06:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy