@zowe/zos-console-for-zowe-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    7.2.5 • Public • Published

    z/OS Console Package

    Contains APIs to interact with the z/OS console (using z/OSMF console REST endpoints).

    API Examples

    Submit a command to the z/OS console

    import { ProfileInfo } from "@zowe/imperative";
    import { IIssueParms, IssueCommand } from "@zowe/zos-console-for-zowe-sdk";
    
    (async () => {
        // Load connection info from default z/OSMF profile
        const profInfo = new ProfileInfo("zowe");
        await profInfo.readProfilesFromDisk();
        const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
        const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
        const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs);
    
        const parms: IIssueParms = {
            command: "D IPLINFO",
            sysplexSystem: undefined,
            solicitedKeyword: undefined,
            async: "N"
        };
        const response = await IssueCommand.issue(session, parms);
        console.log(response);
    })().catch((err) => {
        console.error(err);
        process.exit(1);
    });

    Get the response from a command sent to the z/OS console

    import { ProfileInfo } from "@zowe/imperative";
    import { CollectCommand, ICollectParms } from "@zowe/zos-console-for-zowe-sdk";
    
    (async () => {
        // Load connection info from default z/OSMF profile
        const profInfo = new ProfileInfo("zowe");
        await profInfo.readProfilesFromDisk();
        const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
        const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
        const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs);
    
        const parms: ICollectParms = {
            commandResponseKey: "KEY",
            waitToCollect: undefined,
            followUpAttempts: undefined
        };
        const response = await CollectCommand.collect(session, parms);
        console.log(response);
    })().catch((err) => {
        console.error(err);
        process.exit(1);
    });

    Install

    npm i @zowe/zos-console-for-zowe-sdk

    DownloadsWeekly Downloads

    500

    Version

    7.2.5

    License

    EPL-2.0

    Unpacked Size

    86.4 kB

    Total Files

    45

    Last publish

    Collaborators

    • joe_winchester
    • zowerobot
    • markackertbroadcom