Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zowe zos-ftp view spool-file-by-id command retrieves incorrect contents #61

Closed
ChrisBoehmCA opened this issue Sep 3, 2020 · 1 comment · Fixed by #62
Closed

zowe zos-ftp view spool-file-by-id command retrieves incorrect contents #61

ChrisBoehmCA opened this issue Sep 3, 2020 · 1 comment · Fixed by #62

Comments

@ChrisBoehmCA
Copy link
Contributor

Hi,

Given a job JOB00123, run these commands:

zowe zos-ftp view job-status-by-jobid JOB00123
# a table of spool DDs will print, use one of the DD ids such as 4
zowe zos-ftp view spool-file-by-id JOB00123 4
# output for a different DD than the one shown for this ID in the table will print out
# for example the output for view ob-status-by-jobid might say ID 4 is "SYSTSPRT" 
# but using the view spool-file-by-id command 

zowe zos-ftp view all-spool-by-jobid JOB00123 on the other hand seems to retrieve all the correct contents.

Invoking [email protected] directly from node seems to get the correct contents every time for me, so I wonder what the cause of the issue is...

const Client  = require("zos-node-accessor");
(async () => {
    try {
        const connection = await new Client().connect({
            user: 'xxx',
            password: 'xxx',
            host: 'xxxx',
            port: 21,
            pasvTimeout: 60000,
            secure: false
        });
        const myJobID = "JOB06048";
        const status = await connection.getJobStatus({
            jobId: myJobID,
            jobName: "*",
            owner: "*"
        });
        console.log(JSON.stringify(status, null, 2));
        const lastSpool = status.spoolFiles[status.spoolFiles.length -1];
        console.log(`Retrieving first spool file which should be id # ${lastSpool.id}, name '${lastSpool.ddname}'`);
        const lastSpoolContent = await connection.getJobLog({
            jobId: myJobID,
            jobName: "*",
            fileId: lastSpool.id,
            owner: "*"
        });
        console.log(lastSpoolContent);
        await connection.close();
    } catch (e) {
        console.error("Test script error: " + e);
        console.error(e.stackTrace);
    }
})();
@std4lqi
Copy link
Collaborator

std4lqi commented Sep 5, 2020

I'm afraid it's relevant to this APAR on z/OS V2R3, PI98636: AFTER FTP "LIST" OF SPOOL FILES, FTP "GET" TRANSFERS WRONG FILE.

@tiantn tiantn mentioned this issue Sep 11, 2020
@zFernand0 zFernand0 linked a pull request Sep 17, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants