It is currently 21 Jul 2017 6:41


Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 28 Jul 2014 4:29 
Offline
Nouveau
Nouveau
User avatar

Joined: 10 Oct 2008 8:00
Posts: 15
Hello

Say I have a sysout that contains the line (amongst other things)
FILENUM=23

Is it possible to assign the number of files (23) to %%FileNum by reading the sysout somehow?

Thanks
Kenton


Top
   
PostPosted: 27 Jan 2015 2:11 
Offline
Nouveau
Nouveau
User avatar

Joined: 05 Oct 2012 8:00
Posts: 16
Hi,

yes it is possible in the following way.

Once the job that contains FILENUM=23 in sysout completes add a condition to 'SETGLOBALVAR' job. This SETGLOBALVAR job is one that you will create in Control-M for setting up the variable.
You will need to write a script which will do the following things:

1. Find the sysout on the agent server (I am not sure how sysouts are saved on your agent i.e. what naming convention is used but I believe order_id must be there which will be helpful in finding the sysout.)

2. Strip the line containing FILENUM=23 and then strip the value from string and store it in variable lets call it $FileNumVal

3. Now finally call ctmvar utility to set the variable value to %%FileNum. In your case it will look like this:
ctmvar -action set -var "%%\FileNum" -varexpr $FileNumVal

That's it. I could only think of this, if I get a better solution I'll post an update.

Regards,
Piyush


Top
   
PostPosted: 31 Jan 2015 8:02 
Offline
Nouveau
Nouveau
User avatar

Joined: 14 Jan 2010 9:00
Posts: 58
You could add the ctmvar -action set command in the code that is running instead of trying to parse the sysout.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+10:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved