Page 1 of 1

encode stage command line

Posted: Thu Dec 06, 2007 5:27 am
by abhay10
hi guys,

i am new into data stage and had little confussion with the encode stage
can any one explain what arguements to specify in the command line of encode stage with an example

Posted: Thu Dec 06, 2007 8:08 am
by chulett
A couple of questions...

Have you read the chapter on the stage in the Parellel Job Designer's Guide? What are you attempting to 'encode' or planning on using the stage for?

Posted: Thu Dec 06, 2007 10:35 pm
by abhay10
ya read the document but was unable to get what to specify in the command line

i was trying to encode the data in the sequential file and store the encoded data in another sequential file but i do not know what to specify in the commamd line .

give me an example of any sort that serves the objective of what specifying in the command line

Posted: Thu Dec 06, 2007 10:57 pm
by chulett
Again, define what in the heck you mean by 'encode'. Only then can someone help you with the proper 'command line' to accomplish that.

Posted: Thu Dec 06, 2007 11:59 pm
by abhay10
001,Apoorva,23,M
002,Abhay,24,M
002,roopa,25,M

this is the my input which is stored in the sequential file (example.csv file)

i am passing this example.csv file as input to the encode stage
for this input what we have to specify in the command line of encode stage

Posted: Fri Dec 07, 2007 12:18 am
by chulett
Sorry, but you still have not told us what you mean by 'encode' here, that's a pretty generic word. It's not so much about the input - what kind of output are you expecting from the stage? :?

Posted: Fri Dec 07, 2007 12:30 am
by abhay10
ok i want to encode that data to 0s and 1s
excuse me for not specifying the requirements properly

Posted: Fri Dec 07, 2007 12:41 am
by chulett
OK, one hurdle down. Next problem - do you have a command line utility that will encode a string down to its binary equivalent? That's what I assume you mean by 'to 0s and 1s'.

Recognize the fact that the stage is looking for a 'command line', meaning there is no DataStage utility at work here but rather it is a wrapper that allows you to use operating system (or third party) utilities you have inside DataStage, so to speak. As an example, the manual mentions 'gzip' as a possible 'encoding' operation. Do you have what you would need for this binary encoding? Or is this an academic exercise?

Posted: Fri Dec 07, 2007 12:57 am
by abhay10
no i dont have the command to encode it to binary form

can u encode the above input to any format of your choice so that i get the clear idea so has what to specify in command line

Posted: Fri Dec 07, 2007 9:52 am
by jwilliams
abhay10 wrote:no i dont have the command to encode it to binary form

can u encode the above input to any format of your choice so that i get the clear idea so has what to specify in command line
Perhaps it would help if you familiarized yourself with some UNIX commands at this point. As Craig notes above the encode stage uses one of these to do its dirty work. Perhaps The Google can help you out as an additional resource...

Posted: Fri Dec 07, 2007 11:02 am
by ArndW
Would the UNIX "crypt" command do what you are looking for?