Character Enconding Problem in IBM DataStage Notification Activity - character-encoding

I'm having some trouble with DataStage notification activity when passing a text in PT-BR with accent as "Subject" in DSsendmail_template parameter and run a blat process. I'm using Blat cause my connection need authentication and DS default options doesn't allow It.
I've already tried to change Job NLS em properties, but had no effect.
Bellow the code in dssendmail_template.txt.
%body%
D:\ETL\BlatMail\Blat.exe %file% -sf "%subject%" -f %from% -to "%to%" -server %server%
When running any Notification Activity mail is sent as expected, but subject is unreadeable.
Sending a test e-mail with subject "Envio de email por Blat Sem AutenticaĆ§Ć£o" the result in blat execution is Subject:=?ISO-8859-1?Q?"=3D=3Futf-8=3FB=3FRW52aW8gZGUgZW1haWwgcG9yIEJsYXQgU2VtIEF1dGVudGljYcOnw6Nv=3F=3D"=20?=
There is any command a can run in windows command line to correct this problema or change DataStage configuration?

Related

Customise slack message with if block in Jenkins

I have a requirement to send out a slack message via jenkins post build step based on certain condition. I have put the below code snippet under "Custom Message" of Slack Notification of my jenkins build. Below prints the entire content of get_schedule_response.txt.
Here's the result for the schedule execution --------> ${FILE,path="$WORKSPACE/get_schedule_response.txt"}
I want to send out this slack notification only if the get_schedule_response.txt file content contains text SUCCESS in it. Is it possible to do?
by using grep command u can find out the word SUCESSS in the file get_schedule_response.txt file
if [(grep -o "SUCCESS" "$WORKSPACE/get_schedule_response.txt"}) = "SUCCESS"];
then
#include your slack notification for success
else
#include your slack notification for success
# -o : Print only the matched parts of a matching line,
to refer all options for grep command follow this link
https://www.geeksforgeeks.org/grep-command-in-unixlinux/

Modem AT commands, unable to get into data mode (PPP)

I have a simcom7600 modem which I am trying out via AT commands.
I was able to use AT commands to setup the modem, and connect to an MQTT broker and exchange messages. Now I am trying to figure out how I can do something similar, but then with my own TCP/IP stack. Before diving into the deep there, I would like to confirm that I can get into data mode (PPP) which I am not able to, it seems.
I attached my modem (AT+CGATT=1), and activated it (AT+ACACT=1,1). I verified that I have a carrier/provider (AT+COPS?).
So I thought I was all set to send the ATO (online) commands. But it returns NO_CARRIER every time I try. I have no idea what I am doing wrong.
The logging that confirms above statements:
AT+COPS?
Sending command: AT+COPS?
AT+COPS?[CR][CR][LF]+COPS: 0,0,"NL KPN simyo",7[CR][LF][CR][LF]OK[CR][LF]
AT+cgatt?
Sending command: AT+cgatt?
AT+cgatt?[CR][CR][LF]+CGATT: 1[CR][LF][CR][LF]OK[CR][LF]
AT+cgact?
Sending command: AT+cgact?
AT+cgact?[CR][CR][LF]+CGACT: 1,1[CR][LF]+CGACT: 2,0[CR][LF]+CGACT: 3,0[CR][LF][CR][LF]OK[CR][LF]
ATO
Sending command: ATO
ATO[CR][CR][LF]NO CARRIER[CR][LF]
PS: the [CR][LF] stand for resp. \r and \n, I replace them before I log for ease of reading.
I obviously have to supply more info to the modem, but from this manual I can't seem to figure out which commands I miss, and how I could validate step by step that I am on the right track.
I found this nice document. I'll share it here in case somebody else struggles with this as well.
When I send the following commands:
ATZ (reset)
ATE0 (disable echo)
AT+CGREG? (check registration to PDP network)
AT+CGDCONT=1,"IP","internet" (set APN for my provider, they expect the string "internet")
ATD*99# (start data mode, aka PPP)
then I can break out and move back into PPP with the following commands:
+++ (send + character, wait for 700ms, send + character, wait for 700ms, send + character) => back to AT command mode
ATO (back to data mode)
NOTE: the APN your provider expects, is I think in all cases an easy Google. Your provider will most likely explain how to manually set your APN in case your phone won't do it automatically.

How to send an email with pass/fail tests on jenkins using editable email notificaiton

I have a jenkins job that builds an iOS app and runs a test script which posts the results into an xml file using xcpretty.
In the post build actions I publish the results in xml format. Is it possible to get some of the contents of these results and put them into the email notification to send i.e.
Tests Passed: {Number of passed tests}
Tests Failed: {Number of failed tests}
Total Tests: {Total tests}
In your "Execute Shell"
echo "test log" > /some/file/path/logFile.txt
Then in your "Editable Email Notification-Default Content"
${FILE,path="/some/file/path/logFile.txt"}
You can use attach the XML file to the e-mail and try to use HTML block and add the file name inside. I used it for jpeg file and it worked great.
It's also possible to use a script to examine the file and assign an environment variable, that you'd later use in the content of the email.

Jenkins: How to pass strings to the body of the email notifications

Inside the Execute Shell, a LIST=$(ls -1 dir_name/*rpm) is done. How can I pass the contents of LIST so that they're displayed in the Default Content or whatever is the body of the Editable Email Notification?
You can use the InjectEnv plugin with some settings like below:
In the Jenkins build step (or post step), you can use the $MY_LIST variable:
+ echo build-failure-analyzer.xml buildtriggerbadge.xml cloudbees-plugin-gateway.xml com.cloudbees.dockerpublish.DockerBuilder.xml com.orctom.jenkins.plugin.globalpostscript.GlobalPostScript.xml com.tikal.jenkins.plugins.multijob.PhaseJobsConfig.xml config_project_creation.xml config.xml config.xml.old Connection Activity monitoring to slaves.log credentials.xml Download metadata.log envinject-plugin-configuration.xml envInject.xml Fingerprint cleanup.log hudson.maven.MavenModuleSet.xml hudson.model.UpdateCenter.xml hudson.plugins.copyartifact.TriggeredBuildSelector.xml hudson.plugins.git.GitSCM.xml hudson.plugins.git.GitTool.xml hudson.plugins.groovy.Groovy.xml hudson.plugins.logfilesizechecker.LogfilesizecheckerWrapper.xml

Does the Zebra QLn220 printer have a "Flush" Command?

The ZebraQLn220 has many settings that can be programmatically updated via commands sent it, such as:
! U1 setvar "media.sense_mode" "bar"
However, sometimes it takes several attempts before that change is "seen"/accepted/applied by the printer. For instance, I have sent the
! U1 setvar "power.dtr_power_off" "on"
command several times before this one:
! U1 getvar "power.dtr_power_off"
...will finally respond back with "on" (giving me "off" instead the first several times).
So: Is there a command that can be sent to the QLn220 that tells it to "flush" or "write all changes" or "save changes" or "I really mean it this time" or some such?
UPDATE
I don't know what firmware is new enough, but this is what the printer tells me about itself as far as "appl" settings go:
appl.date : 2/19/2014
appl.name : V68.19.7Z
appl.version : 6819
appl.bootblock : 2.5.9
appl.link_os_version : 2.0
If you are using later firmware you can use JSON to format the commands. In this method the commands will respond immediately with the configured values.
{}{"media.sense_mode":"bar"}
would respond with:
{"media.sense_mode":"bar"}
You can also put multiple requests in one:
{}{"media.sense_mode":"bar",
"power.dtr_power_off":"on"
}
The following knowlege base article has more info - https://km.zebra.com/kb/index?page=content&id=SO8638&actp=RSS

Resources