-
Notifications
You must be signed in to change notification settings - Fork 102
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
Look for member on SYSBAS if config.sourceASP is set #1651
Conversation
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Nice. Having a look at the code, it looks like it's falling back to *SYSBAS if it's not in the ASP the user defines first, so it looks in this order:
Just about to give it a test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it worked for reading files.. but not saving!
I don't have any ASPs to test with, but it did allow me to test with an invalid name to test the fall back:
![image](https://private-user-images.githubusercontent.com/3708366/283214483-af39ca7a-e3a1-47a9-8241-fb242fb8f27c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0OTk4MDYsIm5iZiI6MTczOTQ5OTUwNiwicGF0aCI6Ii8zNzA4MzY2LzI4MzIxNDQ4My1hZjM5Y2E3YS1lM2ExLTQ3YTktODI0MS1mYjI0MmZiOGYyN2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMDIxODI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmQ5MmY2ZGU5MDRlNzk1ZTlkMDk4YjkxMmM0YmQ3ZGNmMWEwYTZkMzgxMjc2ODkyN2Q5MDMxYTk3NWIwMTE5MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.VGVNgZBGYJKbTkH4M13cmVhd0CKm14ahJit66_RFKM4)
In the output:
.: system "CPYTOSTMF FROMMBR('/boop/QSYS.lib/LIAMA.lib/QRPGLESRC.file/JP.mbr') TOSTMF('/tmp/vscodetemp-O_3z3bFCsE') STMFOPT(*REPLACE) STMFCCSID(1208) DBFCCSID(*FILE)"
{
"code": 255,
"signal": null,
"stdout": "",
"stderr": "CPFA0A9: Object not found. Object is /boop/QSYS.lib/LIAMA.lib/QRPGLESRC.file/JP.mbr.\nCPFA097: Object not copied. Object is /boop/QSYS.lib/LIAMA.lib/QRPGLESRC.file/JP.mbr."
}
.: system "CPYTOSTMF FROMMBR('/QSYS.lib/LIAMA.lib/QRPGLESRC.file/JP.mbr') TOSTMF('/tmp/vscodetemp-O_yubtaBfe') STMFOPT(*REPLACE) STMFCCSID(1208) DBFCCSID(*FILE)"
{
"code": 0,
"signal": null,
"stdout": "CPCA082: Object copied.",
"stderr": ""
}
When trying to save this member:
![image](https://private-user-images.githubusercontent.com/3708366/283214728-672b162d-2609-4774-b2ac-c78abc642224.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0OTk4MDYsIm5iZiI6MTczOTQ5OTUwNiwicGF0aCI6Ii8zNzA4MzY2LzI4MzIxNDcyOC02NzJiMTYyZC0yNjA5LTQ3NzQtYjJhYy1jNzhhYmM2NDIyMjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMDIxODI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTVlNzBlOTU2MzM5OTM5OTM3ZThjNTg5ZDA2Y2UwOGE5YzY1ZWJkYjhmYzU1MDBiYzViN2ZmM2JhMjJjOGNkZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Zf67cV3hjYk1mTJ0OTtDnKj5U19shKvRbTmTbyU8MyA)
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Ugh, yeah, I forgot that there is a download AND an upload memberContent 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, now it works! This is a totally nice UX improvement.
@sebjulliand Merge when you are ready!!
Changes
This fixes an issue that can happen when
downloadMemberContent
is called to open a member located on*SYSBAS
and an iASP is specified in the Connection Settings (i.e.config.sourceASP
).When
config.sourceASP
is set,downloadMemberContent
will always assume the member content to fetch is located on that IASP. If the member is actually on*SYSBAS
, it can never be read.This PR makes
downloadMemberContent
tries twice to fetch a member if an IASP is set in the settings:Checklist