Encode

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vijayg
Premium Member
Premium Member
Posts: 14
Joined: Wed Oct 10, 2007 7:55 am

Encode

Post by vijayg »

I need to read a falt file, create a XML file and XML File should be encoded to base64 before sending out/ftp.

Please let me know how we do this in datastage? even if you have done anyother encodeing(other than base64) please let me know tooo.

Thanks for the help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

I assume "falt file" is a typo. Use Sequential File stage, XML Output stage, External Target stage. In the External Target stage execute your uuencode command and direct its output into a file, then run a script to FTP this whereever it needs to go. Optionally delete/move the data file when done.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijayg
Premium Member
Premium Member
Posts: 14
Joined: Wed Oct 10, 2007 7:55 am

Post by vijayg »

Ray,
Thank you very much for the reply. I guess your solution is perfect for the question I had asked.

Guys, My problem here got little more complicated, now we need to encoded only data in the XML leaving header information in XML not encoded.

Again thanks for the help in advance.

Vijay.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do it in an after-job subroutine. Your job writes the header and body separately. The after-job subroutine encodes the body and (possibly) cats the head and body together. The result is then transferred.

You can use DataStage BASIC code or shell script. Doesn't matter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijayg
Premium Member
Premium Member
Posts: 14
Joined: Wed Oct 10, 2007 7:55 am

Post by vijayg »

Good Idea! I will try it on Monday and update you all. I also had little bit of problem using external stage, I am new to this new environment.

Thanks so much.
Vijay.
Post Reply