This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import json | |
| class ZoweCallError(Exception): | |
| def __init__(self, returncode, cmd, arguments, output=None, stderr=None): | |
| self.cmd = cmd | |
| self.arguments = arguments | |
| self.returncode = returncode | |
| self.output = self.stdout = output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import json | |
| def zowe(arguments): | |
| zowe_command = "zowe " + arguments + " --rfj" | |
| try: | |
| completed_process = subprocess.run(zowe_command, shell=True, capture_output=True, check=True, encoding="utf8") | |
| parsed_output = json.loads(completed_process.stdout) | |
| return parsed_output.get("data", parsed_output) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import json | |
| completed_process = subprocess.run('zowe zos-jobs list jobs --rfj', | |
| shell=True, capture_output=True, check=True, encoding="utf8") | |
| jobs = json.loads(completed_process.stdout)["data"] | |
| for job in jobs: | |
| if job['status'] == 'OUTPUT': | |
| print(f"Job {job['jobname']}({job['jobid']}) has return code {job['retcode']}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "success": true, | |
| "exitCode": 0, | |
| "message": "List of jobs returned for prefix \"*\" and owner \"null\"", | |
| "stdout": "JOB10931 CC 0000 ZOWEUSERA OUTPUT\nJOB10930 CC 0000 ZOWEUSERA OUTPUT\nJOB10929 CC 0000 ZOWEUSERA OUTPUT\nTSU08423 ZOWEUSER ACTIVE\n", | |
| "stderr": "", | |
| "data": [ | |
| { | |
| "owner": "ZOWEUSER", | |
| "phase": 20, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| completed_process = subprocess.run('zowe zos-files list data-set "MFAAS.ZIGI.*"', | |
| shell=True, capture_output=True, check=True, encoding="utf8") | |
| data_set_names = completed_process.stdout.splitlines() | |
| for data_set_names in data_set_names: | |
| print(data_set_names) | |
| # Prints list of data sets with ZOWEUSER prefix - for example: | |
| # ZOWEUSER.EXEC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -ex | |
| # Obtain the list of data sets: | |
| dslist=$(zowe zos-files list data-set "MY.PROJECT.DS*") | |
| # Delete each data set in the list: | |
| IFS=$'\n' | |
| for ds in $dslist | |
| do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| touch "`echo "Invalid character 001 \001 END"`" | |
| touch "`echo "Invalid character 002 \002 END"`" | |
| touch "`echo "Invalid character 003 \003 END"`" | |
| touch "`echo "Invalid character 004 \004 END"`" | |
| touch "`echo "Invalid character 005 \005 END"`" | |
| touch "`echo "Invalid character 006 \006 END"`" | |
| touch "`echo "Invalid character 007 \007 END"`" | |
| touch "`echo "Invalid character 008 \008 END"`" | |
| touch "`echo "Invalid character 009 \009 END"`" | |
| touch "`echo "Invalid character 010 \010 END"`" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env perl | |
| use File::Basename; | |
| use Cwd 'abs_path'; | |
| use lib dirname($0).'/oebin'; | |
| use CheckHeldOutput; | |
| use Getopt::Long; | |
| use Pod::Usage; | |
| use File::Basename; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Update server port and recycle | |
| hosts: sys1 | |
| gather_facts: no | |
| tasks: | |
| - name: Update PARMLIB member | |
| shell: zowe zos-files upload file-to-data-set config.env "MY.PARMLIB(MYSERV)" --zosmf-profile {{ zowe_profile }} | |
| delegate_to: localhost | |
| - name: List STCs | |
| shell: zowe jobs list jobs --prefix MYSERV --zosmf-profile {{ zowe_profile }} | grep ACTIVE || true | |
| delegate_to: localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import java.nio.channels.Channels; | |
| import java.nio.channels.FileChannel; | |
| import java.nio.channels.ReadableByteChannel; | |
| public class jurl { | |
| public static void main(String[] args) throws MalformedURLException, IOException { |