Running DSTX map in thread

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
arvindmaurya
Participant
Posts: 5
Joined: Wed Aug 23, 2006 9:37 am

Running DSTX map in thread

Post by arvindmaurya »

Hi All,

Is there is any method by which we can run the DSTX 7.5 map for unix OS in multi thread using command server.
Is there is any other method other than using the API

Thanks in Advance
Arvind Maurya
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

The rules would be the same as using the eventserver....

logs, outputs etc.... would require uique names or be turned off.
arvindmaurya
Participant
Posts: 5
Joined: Wed Aug 23, 2006 9:37 am

Post by arvindmaurya »

jvmerc wrote:The rules would be the same as using the eventserver....

logs, outputs etc.... would require uique names or be turned off.

HI jvmerc

It is not working can you please show some example of writing the command
It will be very help ful to me
thnaks
Arvind Maurya
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

Not sure how it would be written in unix but.... The problem should be the same as in windows.... You can't run 2 maps at the same time if they share files that are being written to, like output cards or logs. So, you have to override their names.

Assume you:
1. assign a unique file or job id each time you execute the runmap called file_id.
2. always want a log file.
3. are not refering to a table that might be locked
4. want or plan to handle unique file names
5. the input/output file is not in the same path as the map and the paths are defined in fields called path_in, path_out, file_in and file_out

A map riule would look something like this....

run ("map_name",
/* Override runmap log file name and settings */
" -ae='" + seriestotext(file_id + ".xml" ) +"'" +
/* Control I/O */
" -IF1 '" + path_in + file_in + "'" +
" -OF1 '" + path_out + file_id + file_out + "'")

In windows, assuming you are using the command server and input/output files plus file_id is known by the tool executing the map.....

path\mercnt.exe path\map_name -if1 path\file_name -of1 path\unique_output_file_name -ae unique_log_file_name -b

so.. assuming your input/output paths are as shown below and have job_ids of 1001, 1002, 1003..... your command line would look something like...

data paths:

\\server\share_in\file_name
\\server\share_out\*.*

\\server\7.5_share\mercnt \\server\map_share\blah\blah\map_name -if1 \\server\share_in\file_name -of1 \\server\share_out\1001_name_ext -ae job_id_map_name.xml -b

\\server\7.5_share\mercnt \\server\map_share\blah\blah\map_name -if1 \\server\share_in\file_name -of1 \\server\share_out\1002_name_ext -ae job_id_map_name.xml -b

\\server\7.5_share\mercnt \\server\map_share\blah\blah\map_name -if1 \\server\share_in\file_name -of1 \\server\share_out\1003_name_ext -ae job_id_map_name.xml -b

Again, wrote this on the fly so it might need work and not sure its the same on unix but should work similarly and you can always look at the command server pdf. should have some examples of file name overrides etc...

We do this all the time with web_queries where we capture the input path + data and respond with answer via Event Agent and Event Server

We also use a non-DSTX scheduler to process most inbound activity now and do a lot of what it sounds like you want to do, just in Windows.

Luck... Let us know if this helps
jvmerc

PS: In windows you have a command line limit. If you kep it to 250 byte you should be same. In DSTX 8.n the limit goes to something like 1000.
Post Reply