WMB Bar File Migration from v7.1 to IIB9 - ibm-mq

11 Am currently migrating ESQL Message flow and Bar file codes from V7.1 to IIB9. For doing this I need to convert messageflows in to subflows. Then for creating bar files in mqsicreatebar command I chose 'deployAsSource' option. After creation of bar files I noticed that my bar files include all ESQL and subflows which were part of compilable main message flow which I have provided in mqsicreatebar. When I deployed this bar to execution group I noticed that every ESQL and subflows are also deployed. Ideally only main messageflow should have deployed on Execution Group. Is there anything or option am not choosing while this migration, please suggest.

In the toolkit, open up the Bar editor.
On the 'Prepare' tab, over on the right-hand side is a list of 4 checkboxes. One of these is 'Compile and in-line resources' - check this.
In the main editor page, make sure that only msgflows are selected. Build and Save.
When you look inside the bar file, you should only have CMF files.
EDIT: OP wanted to use the cmd line for generating the bar file. Here is a command that I used:
mqsicreatebar -data C:\Users\Adam\IBM\IIBT10\workspace -b C:\Users\Adam\cmd.bar -p Foo -o /Foo/foo1.msgflow
The mqsicreatebar command documentation might be useful for you.
I think using the deployAsSource option was a mistake in this case. Here's what the doc has to say about that option.
-deployAsSource
(Optional) Include this parameter to deploy applicable resource files without compiling them.
When the -deployAsSource parameter is used, any applicable resources are added to the BAR file as source files, and are not compiled into message flow .cmf files.
You cannot include both the compiled (.cmf) and source (.msgflow) versions of a message flow in a BAR file.

Related

XCTest for a Mac command line application

I want to test a command line application, but
import XCTest gives me a message that the underlying module cannot be loaded.
How can I test a simple "hello world" command line App?
So, you have a simple command line app with main.swift/main.m and maybe some other code.
By default you have only one target with the same name as your product.
Press the "project" file, and you'll get smth like this:
The blue icon in the left-top corner is your project's file, and in the right-bottom part you have a list of targets.
Press the "+" button, and select MacOS Unit testing Bundle:
Name your testing bundle somehow, e.g. test:
Now your project contains 2 targets: one "main" (named the same as the project) and one "testing".
When adding a new file, don't forget to add it to the testing target (the checkbox under the Targets section ):
Please note that this type of testing target is Logic tests, not Application tests, for more info look here: https://forums.developer.apple.com/thread/52211
After adding unitest for macOS command line we will end up with many linking errors. to avoid that,
For adding unit test target (XCTest) for Mac OS Command Line project which has(main.swift and other swift files), to make this work,
Add UnitTests target to scheme by editing in manage schemes
Make your functions and classes has PUBLIC access
This solved all my linking errors.Hope it helps you as well

Goland: run arbitrary code quality tool, get clickable results

I have an (in-house) code quality tool that produces results like this, when run from the shell:
fooer/quxxer_bulk_stuff.go:40:16: rhubarb rhubarb...
fooer/quxxer_load.go:22:16: rhubarb rhubarb...
fooer/quxxer_load.go:78:16: rhubarb rhubarb...
How do I configure Goland so that I can run the tool on demand (i.e. not a File Watcher) and have the results appear in a run window? Also, I want to be able to click on a line in the results and jump to the referenced file and line, so I can review/fix the problem.
(Goland version 2019.1, Build #GO-191.6183.86)
You can configure it as an external tool in Settings | External Tools. To get clickable results, define an output filter ($FILE_PATH$:$LINE$:$COLUMN$:.* should work for your case). See the documentation for more information.

"open in IE 1.4" addon stopped working

Whenever I press on the open in IE icon, I get an error in the console:
Error: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIProcess.init]
Source File: chrome://openinie/content/openinie.js
Line: 126 (This happened ever since upgrade to 16.0 and I assume it's probably security related)
I found that js file to be inside some "openinie#wittersworld.com.xpi" file (which I cleverly renamed to zip), and saw the offending line:
var iePath = openinie.getIEPath();
// create an nsILocalFile for the executable
var file = Components.classes["#mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(iePath);
// create an nsIProcess
var process = Components.classes["#mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
process.init(file); // <-line 126
is it possible to fix it and "re-compile" it zipping and renaming?
(I assume it's something with security maybe).
can I debug this using for example an alert box to display values of variables?
is it possible to fix it and "re-compile" it zipping and renaming
Yes, you can simply replace a file in the ZIP archive, most extensions aren't signed (you can remove the META-INF directory from the XPI file if this one is). In fact, for your debugging it is better to unpack openinie#wittersworld.com.xpi into a directory named openinie#wittersworld.com in the same folder and remove the original file - this way you won't need to pack/unpack on each change. You should also start Firefox with the -purgecaches command line parameter, otherwise the file you are changing might get cached.
can I debug this using for example an alert box to display values of variables?
Yes. However, I would rather recommend Components.utils.reportError() method that will log to the Error Console (press Ctrl-Shift-J to open it) without opening modal dialogs. In this particular case I would write:
Components.utils.reportError(iePath);
This seems to point to a non-existent file meaning that the getIEPath() function is faulty.
Good luck!

Visual Studio Installer: How to make app.config a hidden file if I choose to add primary output instead of individual files?

Basically, I created a Visual Studio Installer project. I added a primary output to my project, which was great because it loaded in the dependencies and files automatically for me. The problem I'm facing is that I want to be able to mark my config file as a hidden file, but can't seem to figure out how.
When I go to View>File System it lists:
MyExternalAssembly.dll
Primary output from MyProject (Active)
So, is there a way to actually mark my config file as hidden during installation if I add a primary output project instead of the individual files?
I'm not sure if you really want to make it hidden. If you're worried about users looking at it, a more than average user will know how to un-hide things and pilfer around. So, that being said, if you want to keep users from seeing what's in the config you will need to encrypt the config. A good example of that can be found here:
http://www.davidhayden.com/blog/dave/archive/2005/11/17/2572.aspx
If you still want to hide the config, then you could try hiding it once the application is run for the first time.
Using: ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun with a click once application you can tell if this is the first time an application is run.
You could then use File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden); to actually hide the app.config.
Which would result in:
if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun)
{
File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);
}

What's the easiest way to make a CC.NET local trigger to execute a program?

When the build fails, I'd like to execute a program that shoots me in the head with this. I've written the program already - I just need it to run when I break the build.
CCTray has the option to make a sound or icon - but not to run a file. Any simple ideas? I'd rather this not be an all day project. :)
CCTray allows you to run commands. In CCTry, go to File | Settings and then click on the Exec tab.
If you run Outlook, you can set up a rule that runs an application whenever you receive an email saying the build is broken. Just follow the rules wizard and you will find it (in Ootlook 2007 it's on the 3rd page of the wizard, in the select action part).
Cradiator has functionality to monitor build servers and do stuff when a build breaks. It doesn't have code to run an executable but it would be a cinch to download the code, change it and get what you want. Here's what I think is the quickest path to getting this done:
Download the source for Cradiator
Edit the DiscJockey.cs class
Add 1 line of code that starts your program (line 34) eg:
Configure Cradiator to monitor your build server (ie edit app.config and add your url) and run
if (newlyBrokenBuilds.Any())
{ // Add a line of code to start your program here eg
Process.Start("C:\\myprogram.exe");
}

Resources