WARNING! 16126 bare linefeeds received in ASCII mode


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting WARNING! 16126 bare linefeeds received in ASCII mode
# 8  
Old 02-11-2015
Consider getting one of the mainframe coders to write a small bit of ANSI COBOL. Use that to transform the packed data.

Here is a discussion of the COBOL needed.
Packed Decimal
IF you have Microfocus COBOL on UNIX you can compile and run it there on the UNIX box. If you really want to spend some time consider C. There is not much I can see out there in the way of C code to convert packed decimal data.
This User Gave Thanks to jim mcnamara For This Post:
# 9  
Old 02-11-2015
We had a similar requirement to transfer vast amounts of data across a small network link from one site to another. We used PKZip from PKWare to achieve it. There is a cost to the software I think, but it did the job beautifully. We closed our window for data transfer from 38 hours to about 6 - obviously we had plenty of CPU available to do the compression part.

Results will vary depending on the data volume, data structure, the CPU available and the network speed, but it was pretty impressive. The EBCIDIC to ASCII conversion was handled, but we could not send packed data and we had to be careful with unusual characters, e.g. those with accents etc.

I'm sure other vendors may also be able to help you too.



Robin
This User Gave Thanks to rbatte1 For This Post:
# 10  
Old 02-11-2015
Thanks all for your reply..As per the suggestion we are talking to vendor if then can unpack the data at their end...hope it will help, else I will come back to you.. Smilie
# 11  
Old 02-11-2015
Hi.
Quote:
Originally Posted by joshilalit2004
I tried dd but it is not converting the file correctly as it has few packed decimal columns in it..
...
I tried iconv and it says "iconv: conversion from EBCDIC unsupported" and recoded says "No manual entry for recode."....
If you wish to do more work yourself, see perl code at https://metacpan.org/pod/distributio...ert/IBM390.pod :
Quote:
Convert::IBM390 supplies various functions that you may find useful when working with IBM System/3[679]0 data. No functions are exported automatically; you must ask for the ones you want. "use ... qw(:all)" exports all functions.

By the way, this module is called "IBM390" because it will deal with data from any mainframe operating system. Nothing about it is specific to z/OS, or z/VM, z/VSE, i5/OS, z/TPF....

When transmitting EBCDIC data to your Perl environment via FTP, be sure to use the "binary" option. This will leave the data unconverted so that the module recognizes it. By default, FTP will translate the data to ASCII; this will convert the character fields correctly but garble other formats, such as packed-decimal and binary.
which then allows:
Quote:
unpackeb TEMPLATE RECORD
This function is much like Perl's built-in "unpack". It takes an EBCDIC record (structure) and unpacks it into a list of values. If called in scalar context, it will return only the first unpacked value. The TEMPLATE is patterned after Perl's unpack template but allows fewer options. The following characters are allowed in the template:

c or C (1) Character string without translation
e (1) EBCDIC string to be translated into ASCII; preserve
trailing nulls and spaces
E (1) EBCDIC string to be translated into ASCII; strip
trailing nulls and spaces
i (2) Signed integer (S/390 fullword)
I (2) Unsigned integer (4 bytes)
p (1) Packed-decimal field
...
Best wishes ... cheers, drl
This User Gave Thanks to drl For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ascii Mode appending extra records to csv file

I am relatively new to this forum and Unix scripting. ksh script: part 1 :will call a PL\SQL program will create 3 CSV file at the unix directory. part 2 : will sftp the files to the EFT server. Once the EFT server receives these file , it will transfer them to a shared windows folders. ... (3 Replies)
Discussion started by: developerpa
3 Replies

2. Shell Programming and Scripting

Add missing linefeeds between formfeeds in reports

I need to take a report text file that is output from vendor software and there are some pages which have less then the normal amount of lines. I need to add these missing line feeds as there is a merge program that reads this file in fixed character and line mode template to output the final PDF... (6 Replies)
Discussion started by: rnygren
6 Replies

3. Shell Programming and Scripting

Help with removing embedded linefeeds

Greetings all, i have csv file with pipe separated columns SSN|NAME|ADDRESS|FILLER 123|abc|myaddress|xxx 234|BBB|my add ress broken up|yyy In the example above, the second record is broken into multiple lines. I need to keep going until I find a "|" since this issue is with the... (14 Replies)
Discussion started by: stayalive
14 Replies

4. Solaris

"lpr.error] Warning: Received SIGPIPE" continuously appearing in logs

On a Solaris 8 print server we're continuously (every 2 minutes or so) getting these messages in the logs: printd: Warning: Received SIGPIPE; continuing I've applied this patch and restarted the printd daemon, but it doesn't help: #109320-22: SunOS 5.8: lp patch Does anyone have any idea what... (4 Replies)
Discussion started by: aussieos
4 Replies

5. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

6. Shell Programming and Scripting

How to find whether a file is transferred thro bin or ascii mode?

Hi Gurus, I need to find out, if i have transferred a file from ftp thro bin mode or ascii mode. Say if i have a file called "dec.sh"( u shuld normally transfer thro ascii mode). How can i find out that dec.sh is tranferred from ftp server thro ascii mode or bin mode? Any help would be... (9 Replies)
Discussion started by: Ashok_oct22
9 Replies

7. Shell Programming and Scripting

SFTP in ASCII mode

Hi Copying a file from Unix (Solaris) to a windows server using sftp. File arrives with carriage returns and line feeds screwed (binary file transfer). Is there a way to get these to copy properly without having to edit or messa about with the file on the windows side. I know with FTP you can... (4 Replies)
Discussion started by: billy_mega
4 Replies

8. UNIX for Advanced & Expert Users

Converting ASCII to Binary mode

Dear All, Business Users are transfering ( FTP ) a CSV file into the IBM AIX box with transfer mode as ASCII. But I want to convert the CSV file from ASCII mode into binary mode, as my script expects file in binary mode. Is it possible to do through Unix commands? Thanks in Advance, RK (1 Reply)
Discussion started by: srajeshmca
1 Replies

9. SCO

compressed file was ftpied in ascii mode needs recovery

I am unbale to uncompress a file which was compress then moved to another pc in ascii mode instead of binary mode. Is there any way to recover it. Please help us. While uncompress it is giving corrupt input. (3 Replies)
Discussion started by: raj2610
3 Replies
Login or Register to Ask a Question