Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Converting AS400 file with packed Decimal fields to ASCII

Posted on 2004-09-26
7
1,181 Views
Last Modified: 2008-01-09
Team,

I am in need for a suitable tool which can do the converstion from AS400 EBCDIC to Windows ASCII and vis versa from command prompt. I don't have CA and I can't buy expensive tools.

If there is a way to have a direct socket connection (either through ODBC or JDBC) that will be ok but I need the suitable driver and I don't want to buy Microsoft HIS for example.

Appreciate your quick response.

Thanks in advanced
0
Comment
Question by:Jablif
  • 3
  • 2
7 Comments
 
LVL 6

Expert Comment

by:dedy_djajapermana
ID: 12154747
hi,

use windows FTP that:
1. do remote execute CPTOIMPF; CPYTOIMPF will convert packed decimal to normal decimal. You can test the command first.
2. GET the result of the CPYTOIMPF

Please let me know if you need example.
0
 

Author Comment

by:Jablif
ID: 12157684
Hi Dedy,

Thanks for your reply.

Actually, I appreciate if you give the example so I better execute it.

Thanks again
0
 
LVL 6

Accepted Solution

by:
dedy_djajapermana earned 500 total points
ID: 12157988
hi

supposed you have PFILE in library LIBRARY
first, create a folder to contain the temporary converted file, e.g., CRTFLR FTPTMP

on the PC:
create a text file named FTP.SRC with notepad with content like this:
qsecofr
passwordofQSECOFR
quote rcmd CPYTOIMPF FROMFILE(LIBRARY/PFILE) TOSTMF('/qdls/ftptmp/PFILE.csv') MBROPT(*REPLACE) RCDDLM(*CRLF)
get /qdls/ftptmp/PFILE.csv
quit

----end of FTP.src file

then on the command line (assumed that the fTP.src is in the same directory):
C:>ftp -s:ftp.src xxx.xxx.xxx.xxx
(xxx.xxx.xxx.xxx is your as/400 IP address)
the file is downloaded as PFILE.csv in your directory

0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 6

Expert Comment

by:dedy_djajapermana
ID: 12158280
hi dave,

note that i put cpytoimpf, and ftp the CPYTOIMPF'ed file, not the file with packed field.

dd
0
 

Author Comment

by:Jablif
ID: 12158401
Thanks a lot Dedy I will try that then will let you know the result.

Hi Dave,

I have read the mentioned thread but it was talking about either using CA or MS HIS. I don't have them both.

0
 
LVL 14

Expert Comment

by:daveslater
ID: 12158632
Hi  dedy_djajapermana

sorry, I did not see that bit. It iis best to go with  dedy_djajapermana  solition and ignore my comment as it will over complicate things

dave

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question