-
Notifications
You must be signed in to change notification settings - Fork 97
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
All source files giving the 'Failed to save file xxxxx unable to write file' message #1375
Comments
After you try to save the file, can you share the Code for IBM i output in the Output tab? |
Thanks such a prompt reply ...the output in the output tab doesn't seem to be changing updating when I try to save |
I have the same problem but only if the file size exceeds 100 KB ?!! |
And what’s worse it also clears the source physical file member. |
Yes that's happening here too |
Folks, we really need the Code for IBM i output channel content (found in the drop-down on the Output tab) in order to debug these issues. Thanks! |
Current library: W_FF00150 Current library: W_FF00150 CPF3012: FILE FI4101 IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 Current library: W_FF00150 CPF3012: FILE F4101LB IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE F4101LC IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE FHCP9201 IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE F9201 IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE FHCP1000 IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE FHCP1000LA IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE FHCP1001 IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE FHCP1001LB IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPF3012: FILE FHCP1005 IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 Current library: W_FF00150 CPF3012: FILE RHCP1000 IN LIBRARY *LIBL NOT FOUND. Current library: W_FF00150 CPC2206: OWNERSHIP OF OBJECT QZSHSYSTEM IN QTEMP TYPE *USRSPC CHANGED. |
Changing the library list to fix the "File not found" errors does not make a difference. |
After restart of VS I now get this (normal) output but still unable to save and clear of src-pf mbr: Current library: W_FF00150 CPC2206: OWNERSHIP OF OBJECT QZSHSYSTEM IN QTEMP TYPE *USRSPC CHANGED. Current library: W_FF00150 Current library: W_FF00150 CPF9861: OUTPUT FILE RFI4970678 CREATED IN LIBRARY ILEDITOR. Current library: W_FF00150 Current library: W_FF00150 CPF9861: OUTPUT FILE RF41971639 CREATED IN LIBRARY ILEDITOR. Current library: W_FF00150 Current library: W_FF00150 CPF9861: OUTPUT FILE RFHC972739 CREATED IN LIBRARY ILEDITOR. Current library: W_FF00150 Current library: W_FF00150 CPF9861: OUTPUT FILE RFHC973677 CREATED IN LIBRARY ILEDITOR. Current library: W_FF00150 Current library: W_FF00150 CPF9861: OUTPUT FILE RFHC974640 CREATED IN LIBRARY ILEDITOR. Current library: W_FF00150 Current library: W_FF00150 CPF9861: OUTPUT FILE RF01975669 CREATED IN LIBRARY ILEDITOR. Current library: W_FF00150 Current library: W_FF00150 CPF9861: OUTPUT FILE RRHC976467 CREATED IN LIBRARY ILEDITOR. |
@ffleer last question: do you have SQL enabled and source dates enabled? |
yes "Enable Source Dates" and "Enable SQL" are both enabled. |
Disabling SQL did not make a difference BUT disabling Source Dates DOES ! |
Hi Thanks!_** Current library: QGPL CPF3012: File PCMACHPF in library *LIBL not found. Current library: QGPL CPF3012: File PCORDL0 in library *LIBL not found. Current library: QGPL CPF3012: File PCSCHPF in library *LIBL not found. Current library: QGPL CPF3012: File PCCRITPF in library *LIBL not found. Current library: QGPL CPF3012: File HRJCIML1 in library *LIBL not found. Current library: QGPL CPF3012: File PCHAZPF in library *LIBL not found. Current library: QGPL CPF3012: File HRJNFCPF in library *LIBL not found. Current library: QGPL CPF3012: File HRJNFCL2 in library *LIBL not found. Current library: QGPL CPF3012: File COSIZEL1 in library *LIBL not found. Current library: QGPL CPF3012: File HRJBOML1 in library *LIBL not found. Current library: QGPL CPF3012: File PCLEADPF in library *LIBL not found. Current library: QGPL CPF3012: File PCFNWDPF in library *LIBL not found. Current library: QGPL CPF3012: File HRJFITPF in library *LIBL not found. Current library: QGPL CPF3012: File HRJGPRL1 in library *LIBL not found. Current library: QGPL CPF3012: File HRJGPCL3 in library *LIBL not found. Current library: QGPL CPF3012: File HRJFACPF in library *LIBL not found. Current library: QGPL CPF3012: File HRJGCHL1 in library *LIBL not found. Current library: QGPL CPF3012: File DCSCIU in library *LIBL not found. Current library: QGPL CPF3012: File IC198XPF in library *LIBL not found. Current library: QGPL CPF3012: File IC198XDWW in library *LIBL not found. SQL is enabled... tried disabling Source Dates ...unfortunately didn't solve the problem for me... |
If I disable "Source Dates" I can save my source code without any errors. The output tab is then empty. |
thanks for the suggestion ffleer ...still not working for me with any combination of SQL and source dates enabled or disabled ....am getting the message: Failed to save 'nw040xr.rpgle': Unable to write file 'member:/WOWILLIAM/qrpglesrc/nw040xr.rpgle' (CPDA08C: Database file CCSID is 65535. |
And you did not forget to save your settings and restart VS ? Sorry had to ask :-) |
And you did not forget to save your settings and restart VS ? Sorry had to ask :-) Yep have saved (both unticked) and restarted VS but still getting the same message :( |
@AndyGildroy your issue is different from some of the other users here.
This means your source file is 65535 (that's not good, btw) You can override this by setting the default source file CCSID in the settings. |
@worksofliam thank you + noted will look into that ....it's probably one of several things in need of update/modernisation here ....Have changed the setting to 65535 but am still getting the message : Failed to save 'nw040xr.rpgle': Unable to write file 'member:/WOWILLIAM/qrpglesrc/nw040xr.rpgle' (CPD0085: Range of parameter DBFCCSID does not include 65535. |
Would the recommended CCSID be 00285 for UK source physical members? |
yes.
Mvg, Frank Fleer.
On 19 Jun 2023, at 17:43, AndyGildroy ***@***.***> wrote:
Would the recommended CCSID be 00285 for UK source physical members?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/halcyon-tech/vscode-ibmi/issues/1375*issuecomment-1597403517__;Iw!!PhQDkBqkFGE!nsDhNPjINkFz4zmZhD1MyVpP98Q5JTGV_Ny75E4RXovCAiZ9-s4FcDbfqrR-YaKxsDQK8GprqRaE3SnuIBYjIIM$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/BAURHV66L7N3DJRPRGJEQ53XMBXQHANCNFSM6AAAAAAZH5GAKM__;!!PhQDkBqkFGE!nsDhNPjINkFz4zmZhD1MyVpP98Q5JTGV_Ny75E4RXovCAiZ9-s4FcDbfqrR-YaKxsDQK8GprqRaE3SnuteudkLY$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
OK big thanks again Frank (and Liam too) ...I'd better look into that |
So just to be clear we can use VS Code but we can't have the source line dates. That makes VS Code unusable for our production environment. |
@ffleer Are you on the latest release 2.0.0 of Code for IBM i? It has a change to the save operation when using source dates (to avoid clearing the member when error occurs). Scanning your output log, I think you may have some CCSID issues (because of the error We have also seen issues with members having SEU colour codes - do you have any of these? |
Hi Christian, Thanks for your feedback, I’m on: Version: 1.79.2 (user setup) After update I’m on: Version: 1.80.0 (user setup) So this is not version 2.0.0. I will do some testing and let you know the outcome. |
Ah yes version 2.0.0 is what I have for Code for IBM i. |
There is one change - The source member is no longer cleared. So that is good. |
@ffleer with the new 2.0.0 update, please share the contents of your Code for IBM i output channel after the member doesn't save. |
This is in OUTPUT Current library: W_FF00150 CPC2206: OWNERSHIP OF OBJECT QZSHSYSTEM IN QTEMP TYPE *USRSPC CHANGED. Current library: W_FF00150 CPF3012: FILE FHEIM IN LIBRARY QTEMP NOT FOUND. |
I only changed the uppercase R to lowercase. |
It almost looks asif CPF3012 causes the trouble. |
@ffleer What's the character in the source member in the comment lines If it's a SEU colour code (hex values x'21' etc), you have two choices: I would strongly advice option 1 - to remove these characters! They are only useful in SEU and SEU is not useful!! 😜 |
Yes removing the x'22' (highlight comment line) from the source line did indeed fix the editor hick up. |
Please clear the Code for IBM i output, try your save operation and provide the OUTPUT here after getting the error. |
When I removed ALL X'22' from the source code the save works !!! |
Great to hear! Hope you find Code for IBM i more useful and more compatible to all your environments. |
I like it a lot but all of our legacy code is full with x'22' (and others). Not everybody will be happy if these get removed. Anyway, I will certainly continue with Code for IBM i. Thanks for your support. |
Go ahead and use Code for IBM i to full extent - and then show your colleagues just how much better experience it is then clinging on to SEU: No color codes are necessary, VS Code will show the source in color by itself. 😍 |
It would be very nice if Code for IBM i replaces X'22' (and other color attributes) with X'40' (space). This would make life much easier. This could be a config setting. |
You can replace the colour codes for spaces using SQL on the server. Here is a SQL procedure, that will do what you want: create or replace procedure QGPL.Remove_SEU_colour_codes(
Lib varchar( 10 )
, Fil varchar( 10 )
, Mbr varchar( 10 )
)
begin
execute immediate 'create or replace alias QTEMP.MEMBER for ' concat Lib concat '/' concat Fil concat '(' concat Mbr concat ')';
update QTEMP.MEMBER
set SRCDTA = translate( SRCDTA, ' ', x'2021222324252628292C2D3031323334353638393A3B3C3D3E' );
drop alias QTEMP.MEMBER;
call SYSTOOLS.LPRINTF( 'Source member ' concat Mbr concat ' in ' concat Lib concat '/' concat Fil concat ' has been cleaned for SEU colour codes.' );
end You call it like this: call QGPL.Remove_SEU_colour_codes( LIB => '<library>', FIL => '<sourcefile>', MBR => '<member>' ) This can be expanded with a SQL procedure to loop through all members in a source file and call |
Yes that is exactly what I do but it is a bit of a pain because we can not change production source code. Only when the program is checked out to development we can change it. Each time we then need to run a SQL command (or call a procedure). Thanks for your help anyway. |
I don't think Code for IBM i should change the source "behind the scenes"... maybe you could make the source cleanup part of your source checkout to development, so you don't have to run it manually... |
What is the status here? cc @chrjorgensen: I reckon we should close this. |
OK with me all my questions well answered :) |
Hi, very new user to VS Code but this seems to happen for any source file I try to save ...not sure what I have done wrong - the profile I've used to connect should have all permissions needed - it's the same one I use on green screen SEU. A 'side issue' is that it seems to be obliterating the the source on the IBMi before trying/failing to save. Hope someone can help
Thanks In advance
Andy
The text was updated successfully, but these errors were encountered: