예제 #1
0
def getPDSMembers(pdsName, issuesErrorMessages=True):
    result = run("zowe files list am  " + pdsName + " --rfj")
    if result.stdout:
        members = json.loads(result.stdout)
        return members['stdout']
    else:
        return ''
예제 #2
0
def deletePDS(pdsName, issuesErrorMessages=True):
    result = run("zowe files delete ds " + pdsName + " -f",
                 issuesErrorMessages)
    if result.stdout:
        return True
    else:
        return False
예제 #3
0
def jobStatus(jobid, issuesErrorMessages=True):
    result = run("zowe jobs view jsbj " + jobid + " --rfj",
                 issuesErrorMessages)
    if result.stdout:
        jobDetails = json.loads(result.stdout)
        return jobDetails['data']
    else:
        return ''
예제 #4
0
def submitLocal(jclName, issuesErrorMessages=True):
    result = run("zowe jobs sub lf  " + jclName + " --rfj",
                 issuesErrorMessages)
    if result.stdout:
        jobDetails = json.loads(result.stdout)
        return jobDetails['data']['jobid'].upper()
    else:
        return ''
예제 #5
0
def submitRemote(pdsName, membName, issuesErrorMessages=True):
    result = run(
        "zowe jobs sub ds  \"" + pdsName + "(" + membName + ")\" --rfj",
        issuesErrorMessages)
    if result.stdout:
        jobDetails = json.loads(result.stdout)
        return jobDetails['data']['jobid'].upper()
    else:
        return ''
예제 #6
0
def getDefaultZosmfUser(issuesErrorMessages=True):
    zoweUser = ZoweUser()
    result = run("zowe profiles list zosmf --sc --rfj", issuesErrorMessages)
    if result.stdout:
        zosmfProfile = json.loads(result.stdout)
        zoweUser.user = zosmfProfile['data'][0]['profile']['user'].upper()
        zoweUser.host = zosmfProfile['data'][0]['profile']['host']
        return zoweUser
    else:
        return ''
예제 #7
0
def downloadPDSMembers(pdsName, toDir, ext="txt", issuesErrorMessages=True):
    if not ext:
        ext = '""'
    result = run(
        "zowe files download am " + pdsName + " -d " + toDir + " -e " + ext,
        issuesErrorMessages)
    if result.stdout:
        return True
    else:
        return False
예제 #8
0
def downloadPDSContent(pdsName,
                       membName,
                       toDir,
                       ext=".txt",
                       issuesErrorMessages=True):
    if not ext:
        ext = '""'
    result = run(
        "zowe files download ds \"" + pdsName + "(" + membName + ")\"" +
        " -f " + toDir + membName + ext, issuesErrorMessages)
    if result.stdout:
        return True
    else:
        return False
예제 #9
0
def createPDS(pdsName, issuesErrorMessages=True):
    result = run("zowe files create classic " + pdsName, issuesErrorMessages)
    if result.stdout:
        return True
    else:
        return False