Skip to content

Fix download source file#3341

Merged
sebjulliand merged 1 commit into
codefori:masterfrom
buzzia2001:fixDownloadSrc
Jul 4, 2026
Merged

Fix download source file#3341
sebjulliand merged 1 commit into
codefori:masterfrom
buzzia2001:fixDownloadSrc

Conversation

@buzzia2001

@buzzia2001 buzzia2001 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Changes

This PR fixes a bug that occurs if you download two source files with different record format within the same session.

How to test this PR

  1. download a member with small size (92)
  2. download a member with bigger size (100)

Checklist

  • have tested my change
  • have created one or more test cases
  • updated relevant documentation
  • Remove any/all console.logs I added
  • have added myself to the contributors' list in CONTRIBUTING.md

Closes #3340

@buzzia2001 buzzia2001 requested a review from a team July 1, 2026 19:09
@buzzia2001 buzzia2001 self-assigned this Jul 1, 2026
@buzzia2001 buzzia2001 added the bug A confirmed issue when something isn't working as intended label Jul 1, 2026
@bobcozzi

bobcozzi commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Good, you added a DROP IF EXISTS to delete any existing prior temp file. The CPYF CRTFILE(*YES) will create the new one. Looks correct to me. But what if you made the target of the CPYF be the same member name as the source member? That way it is identified if the code needs to be debugged by the user or by us then we would know the member name. Since we now delete it always, it would be a good change to make it TOMBR(${item.member.name}).
This last bit is just a suggestion, now a functional enhancement.

@bobcozzi

bobcozzi commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

You know... I need to test this but what if someone has say 10 developers using CODEfori and they try to download at the same time, and they are use MAPEPIRE SERVER mode?
Since they're using that same submitted job, wouldn't they share QTEMP? Therefore, the CPYF to QTEMP would have an issue/conflict with the name always being the say, wouldn't it?

@buzzia2001

Copy link
Copy Markdown
Member Author

You know... I need to test this but what if someone has say 10 developers using CODEfori and they try to download at the same time, and they are use MAPEPIRE SERVER mode?
Since they're using that same submitted job, wouldn't they share QTEMP? Therefore, the CPYF to QTEMP would have an issue/conflict with the name always being the say, wouldn't it?

Nope, server mode open a dedicated QZDASOINIT (QZDASSINIT) for each client

@sebjulliand sebjulliand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine.
I was thinking we could regroup the members by files and delete the file before copying each set but the performance gain seems negligible since create or replace is quite fast here.

Approved and merged, thanks @buzzia2001 !

@sebjulliand sebjulliand merged commit dec6c2c into codefori:master Jul 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A confirmed issue when something isn't working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download source member fails after prior member download due to QTEMP/QTEMPSRC format mismatch: CPF2962 / CPF2817

3 participants