I'm trying to Display IBM MQ channels using
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q086040_.htm
I defined a channel named MYMQ.SVRCONN, however, this gives me a syntax error:
runmqsc
DISPLAY CHANNEL MYMQ.SVRCONN
5 : DISPLAY CHANNEL MYMQ.SVRCONN
AMQ8405: Syntax error detected at or near end of command segment below:-
DISPLAY CHANNEL
I get the same problem with:
DISPLAY CHANNEL *
Any suggestions why?
I'm struggling to understand this syntax:
>>-DISPLAY CHANNEL--(--generic-channel-name--)------------------>
so bonus points if you can explain how syntax works.
The ( and ) are part of the required syntax.
In the examples you give the commands should be:
DISPLAY CHANNEL(MYMQ.SVRCONN)
or
DISPLAY CHANNEL(*)
Most MQSC command have a similar syntax of:
<command> <object type>(<object name>) [optional parameters]
A few examples:
DEFINE CHL(MYMQ.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('xyzuser')
ALTER CHL(MYMQ.SVRCONN) CHLTYPE(SVRCONN) DESCR('Test channel')
DISPLAY CHL(MYMQ.SVRCONN) MCAUSER
The QMGR object is one of the exceptions where the object type does not need to be followed by a object name since when you run these commands you are connected to a specific queue manager:
DIS QMGR CHLAUTH CONNAUTH
ALTER QMGR CHLAUTH(ENABLED)
A few things to note:
IBM MQ will always fold to UPPER case anything that is not surrounded in single quote ' characters.
Some DISPLAY commands by default display only a subset of all parameters on an object. You can use the special parameter ALL to have it display all of them or you can indicate specific parameters you would like to display.
DISPLAY commands can also use a WHERE clause, for example: DIS CHL(*) WHERE(MCAUSER eq 'xyzuser') DESCR
Related
I would like to know how to limit the number of nodes a single job can use by the account level on slurm.
sacctmgr modify account where name=test9_phase1 set MaxTRESPerJob=nodes=1
This doesnt seem to work, giving the error:
Unknown option: MaxTRESPerJob=nodes=1
Use keyword 'where' to modify condition
and I can't find anything in the documentation on how to do it.
If I could limit it by user that would also work, but again I get an error
sacctmgr modify user where cluster=linux account=test9_phase1 set maxTRESPerJob=nodes=1
Unknown option: maxTRESPerJob=nodes=1
Use keyword 'where' to modify condition
The correct option to set is MaxNodesPerJob. The sacctmgr output can be a bit misleading there.
So in your case, the correct command should be:
sacctmgr modify account where name=test9_phase1 set MaxNodesPerJob=1
I am setting reference to a field as a value to an UDP. see image. I wanted to reference the value at this path at runtime. Tried fetching the value using '{}' but seems like '{}' can't resolve path given in dots.
Second time tried fetching value using Eval function. Got stuck here too as Eval is throwing exception if my input has odd number of characters see error message
SET chrValue = EVAL(LocalTxnID);
Please resolve on how to read the input which is a reference in UDP at runtime. Why are the above methods not working
Looks as if these UDP values are for logging code. I see 'Global transaction id', 'Parent transaction id' and 'Local transaction id'. But IIB has built-in facilities for publishing messages with these fields (https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac37860_.html). Is there a reason why you are not using those features?
Tried fetching the value using '{}' but seems like '{}' can't resolve path given in dots.
Correct. The {} syntax applies to a single NameExpression. You cannot use it to navigate multiple path segments.
Eval is throwing exception if my input has odd number of characters
The exception is reporting an invalid BLOB literal. That seems like a very strange error for an EVAL. Please check that you have quoted the correct error, and please also supply the exact string that EVAL received (if necessary take a user trace using mqsichangetrace, mqsireadlog, mqsiformatlog).
When I run the following command from Mikrotik SSH, I see an asterisk followed by a hex value, which will look something like like *4e.
:put [:execute { :ping localhost count=10 }]
According to the Mikrotik wiki, the :execute command executes commands in the background as a script job. When I print out the currently running jobs, I don't see any relation between the output above with the output of this.
[admin#MikroTik] > /system script job print
# SCRIPT OWNER STARTED
0 admin jun/05/2017 16:58:09
1 admin jun/05/2017 17:07:31
So, what does the output represent and how can I use it?
The return that you get is a MikroTik RouterOS Internal ID. In this case, this is an internal ID for the running job. Internal IDs are immutable references to the object which they represent and have the advantage of being the same between command executions even if concurrent operations are taking place which would change the objects # as shown by print.
You can identify an internal ID by the * followed by a hexadecimal number. In some cases, where there are multiple items to return as is common with find, you will get a ; delimited list of IDs such as:
*d;*1;*18;*3;*19;*1a;*20
Internal IDs can be used as when running other commands just like the printable number and is distinguished by the preceding *. Where a list of multiple internal ids is given, the command will run on each item.
Information on the internal ID data type can be found in the Scripting Manual. Internal IDs do not follow any ordering and you should not assume that they do. To get the internal ID of an object from its ID show in a print output, you can use :put [get <id>] where <id> is the printable id - the output will show the internal id as the .id property.
Using TeamCity 9.1.4.
I'm trying to get some server hostnames into a Command Line script with Configuration Parameters. I want each option to contain multiple hostnames.
My configuration:
vanmain => rad-ecr1,rad-ecr2,rad-ecr3,rad-myecr,rad-balancer
tor => rad2-bal,rad2-ecr1,rad2-ecr2,rad2-myecr
fvcdc => rad-fvcdc,rad-balancer
bccfa => rad-bccfa
When I select fvcdc in a build, I receive the following error message:
One of entered values 'rad-fvcdc' is not one of valid select item values: rad-ecr1,rad-ecr2,rad-ecr3,rad-myecr,rad-balancer,rad2-bal,rad2-ecr1,rad2-ecr2,rad2-myecr,rad-fvcdc,rad-balancer,rad-bccfa
How do I get the values into my script?
Dunkan,
I successfully reproduced your issue and was able to find out the root cause of it.
On my virtual installation I created a build with select type parameter, let's name it HostValue. Next, in Items field I copy/pasted values from your initial post and tried to reproduce the problem -- but executing the build was successful. Then I decided to reconfigure parameter and toggled Allow multiple checkbox, and viola, same error message as you got!
If you read small text below Value separator field, you will see, that default value is comma: , and as your values contain this symbol you got an error.
So, to solve this problem I can suggest you these variants:
If you don't need multiple choices, you can just turn off this feature and everything should work.
Replace default Value separator with custom one, for example <SEP>. Then whenever you will select multiple values for this parameter you will get something like:
"rad-ecr1,rad-ecr2,rad-ecr3,rad-myecr,rad-balancer"<SEP>"rad2-bal,rad2-ecr1,rad2-ecr2,rad2-myecr"<SEP>"rad-fvcdc,rad-balancer"
Replace comma in your values with some other separator, for example | or :. In this case it would look like:
"rad-ecr1:rad-ecr2:rad-ecr3:rad-myecr:rad-balancer","rad-fvcdc:rad-balancer"
After that you can use the value of this parameter as usual %HostValue% and parse depending on which variant you choose.
Maybe the error message from server could be a little bit clearer. Hope it will help you.
Also I would like to recommend you my plugin teamcity-web-parameters. It will allow you to create dynamic select values from external web service.
Take a look at this thread: https://teamcity-support.jetbrains.com/hc/en-us/community/posts/206843785-How-to-specify-empty-value-for-Typed-Parameter -- looks very similar to your question.
I have a source file that contains two fields: IP_ADDRESS and USER_NAME. I want to check whether the IP address is correct or not before loading it to the datawarehouse using DATASTAGE. How do I do this?
I was browsing Stack Overflow and think I might have a solution to your question. If you create a job to grab all of the IP_ADDRESS's from the file and send them to a BASIC transformer (search for BASIC transformer in DataStage. It is NOT the one that is normally on the palette). From there, set the Stage Variables as 'SetUserStatus() and write out the column name to a peek stage (You don't need the output at all. The SetUserStatus is the important part). This will now allow you to pass up the Command Output (list of IP Addresses) to a Sequence. From the Sequence, start with the job you just created (BASIC transformer job) and link that to a User Variables Activity. In the User Variables Activity stage, Set the name to something like 'IP Address' and Expression as IP_ADDRESS.$UserStatus. You can then use a Loop to take that output that is now a List and send each individual IP Address to an Execute Stage with a Ping command to see if it returns a valid IP Address. If it does return a valid IP then have your job that writes the USER_NAME and IP_ADDRESS to do a 'Select' statement where the IP_ADDRESS = the valid IP_ADDRESS. For the ones that aren't valid, you can send them down a different path and have them write out to '.txt' file somewhere so you know which ones weren't valid. I'm sure you will need a few more steps in there but that should be the gist of it.
Hope my quick stab at your issue helps.
Yes, you can use a transformer or a transformer and a filter to do that, depending on the version of Datastage you're using. If you're using PX, just encode the validation logic in a transformer stage, and then, on the output link set up a filter that doesn't allow the rows to pass forward if they didn't pass the validation logic.