Identify AFT jobs

Everything about Control-M Control Modules
Post Reply
vpaldi

Identify AFT jobs

Post by vpaldi » 28 May 2010 3:07

Hi,

is it possible to identify orderid=01xyz as AFT job or not by using cli commands? How? I did not find anything. Maybe you have some idea.

Best regards,
Vince

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 28 May 2010 4:08

Hi,

If you want to located job(s) based on orderid in your AJF, use the GUI.
In the current ViewPoint select <Dynamic Filter> in the Filter list box and put orderid(s) in the defined field.
Best regards
Walty

vpaldi

Post by vpaldi » 28 May 2010 4:36

Thanks Walty,

I want to do some scripting around my jobs, that's why I am looking for CLI-based approach.

Best regards, have a nice weekend,
Vince

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 28 May 2010 6:08

Hi Vpaldi,

Sorry, I did not understand the question correctly
You can watch the utility <ctmpsm>
Best regards
Walty

vpaldi

Post by vpaldi » 28 May 2010 10:37

Well, I went through (and, in fact, using regularly) ctmpsm, but I did not find any option distinguishing between "normal" jobs and AFT jobs. Maybe it is my fault, missed one option or parameter, but have not found AFT indicator. Please specify the command, which will show AFT jobs.

Best regards,
Vince

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 31 May 2010 1:47

Hi,

If you have indentified the 'orderid' use the 'p_36' utility to convert orderid to orderno and vice-versa

orderid to orderno : p_36 <orderid>
orderno to orderid : p_36 "*<orderno>"


After this you can execute a SQL query to locate the AFT job:

select JOBNAME, APPLFORM from CMR_AJF where ORDERNO='your_orderno'

If you want to located all AFT in your AJF jobs use this SQL query:

select JOBNAME from CMR_AJF where APPLFORM='AFT'
Best regards
Walty

vpaldi

Post by vpaldi » 31 May 2010 4:36

Hi Walty, thanks for your efforts. This is exactly what I wanted to avoid: opening an Oracle session, administering users in Oracle, etc. That's why I wanted some cli command. Maybe better to give it up, or, identify AFT jobs according their sysout location.

Best regards,
Vince

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 31 May 2010 5:07

Hi vpaldi,

have you try this :

ctmpsm -LISTFULLDETAILS <orderid>

In the output you find some autoedit like this :

autoedit: %%FTP-blablabla
autoedit: %%FTP-blablabla
......

In this case your job is AFT job
Best regards
Walty

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 31 May 2010 5:41

Hi vpaldi,

I just tried this test and i think that the output can be manipulated by script without problems.

ctmpsm -LISTFULLDETAILS 3wqab|egrep "(Jobname:|%%FTP)"

Jobname: xxx-xxxxx-xxx (is the jobname of your AFT job)
autoedit: %%FTP-ACCOUNT | value: local_remote
autoedit: %%FTP-LPATH1 | value: /tmp/transfer/my_file_local
autoedit: %%FTP-RPATH1 | value: /tmp/transfer/my_file_remote
autoedit: %%FTP-UPLOAD1 | value: 0
autoedit: %%FTP-SRCOPT1 | value: 0
autoedit: %%FTP-TYPE1 | value: I
autoedit: %%FTP-TRANSFER_NUM | value: 1
autoedit: %%FTP-ST1 | value: Ended OK
autoedit: %%FTP-PR1 | value: 100
autoedit: %%FTP-RT1 | value: 00:00:00
autoedit: %%FTP-TR1 | value: 117.6 KB / 117.6 KB
autoedit: %%FTP-RA1 | value: 117.6 KB/sec
autoedit: %%FTP-FAILED_POINT | value: -1:-1
autoedit: %%FTP-TID | value: 3wqab_00001
Best regards
Walty

vpaldi

Post by vpaldi » 31 May 2010 6:19

Hi,

this might be the solution. Obtaining the list of all jobs from the AJF, ask for LISTFULLDETAILS in a loop, grep let's say %%FTP-ACCOUNT (unlikely that a "normal job" uses that autoedit var) and work accordingly. Ugly but will work for sure.

My approach was the opposit: obtain the list of jobs with ONE single command, which contains the indicator of AFT.

Congratulation, you won this game. Best regards,
Vince

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 31 May 2010 7:10

Vince,

You have a good sense of humor, i appreciate :D
It was a pleasure to chat with you.

Good luck
Best regards
Walty

Post Reply