Source member #1214
Replies: 8 comments 2 replies
-
i had same issue today, v1.7.10 too. |
Beta Was this translation helpful? Give feedback.
-
I will double check the code today that handles record format lengths and I will get back to you. |
Beta Was this translation helpful? Give feedback.
-
I have SQL and source dates enabled though not the option to show dates in gutter. My code was NOT over the 112 record length. |
Beta Was this translation helpful? Give feedback.
-
So a record length of 112 means you can only edit up to column 100. I checked the code and it looks fine, as does my tests. @richardm90 Perhaps if you can provide a screenshot or a video of what you're seeing, or perhaps we can meet some time, that would be great. |
Beta Was this translation helpful? Give feedback.
-
@worksofliam It only happens occasionally, maybe once a fortnight, and I've not been able to replicate the problem to date. When I save the source member in VS Code and it goes wrong the source still looks good in VS Code but whats been saved to the member has been chopped off at column 80. I only know I've got a problem when I try compiling. Happy to meet up if it would help clarify the problem. This is probably a daft question but how does VS Code know the record length? Does it establish this when it loads the source member or when it saves it? |
Beta Was this translation helpful? Give feedback.
-
@richardm90 We fetch the record length when the member is opened. I will reach out to you later today or tomorrow to see if we can recreate something :) |
Beta Was this translation helpful? Give feedback.
-
@worksofliam let me know if there's anything more I can do to help move this one forward. It did happen again shortly after I raised the issue but again I wasn't able to replicate the problem. I'm going to ask a few questions just in case this might jog a thought or help to replicate the problem. When I open VS Code which opens with tabs for previously open members, this is often the case for me. I then connect to my IBM I server and then click the retry button on the member to load the source. Could that be going through slightly different logic than if I opened the member through the object browser and possibly not setting the member record length correctly? If I have multiple members open from multiple source files the individual tab must have a property for the appropriate record length. Is my understanding correct? Having multiple members open with different source file record lengths couldn't cause a problem? If I have a tab open for a locally held RPG source file what record length is held to that tab? I guess the same question for IFS RPG source? I'm just wondering if that could somehow affect the record length for source opened in other tabs from source files. |
Beta Was this translation helpful? Give feedback.
-
@worksofliam I am finally able to replicate the problem. Code for IBM i v1.7.12. I have source dates enabled with a tracking mode of diff. I connect to my IBM i server in VS Code. I then create a new source member in QRPGLESRC, which has a record length of 112.
I don't save the source, I don't try to compile. I now simply close VS Code. When I open VS Code again I see the tab for my new member with the following message. I don't click Try Again yet. I reconnect to my IBM i server and then click Try Again. I then compile, which does an auto save, and it fails. If I look in PDM I can see the line has been truncated. I'm not sure this is the only way to replicate the problem but I wonder if you don't open a member via the object browser then maybe the record length isn't being retrieved. |
Beta Was this translation helpful? Give feedback.
-
Code for IBM i v1.7.10
This has happened a few times to me now over recent months but it's not something I've been able to replicate.
I tend to edit RPGLE source via source members and notice the problem with
**FREE
source.When I make a change to an existing
**FREE
source characters beyond column 80 are removed i.e. characters from column 80 to 100, and it's generally not the source lines I've been editing it it the whole source member that is affected. My QRPGLESRC source file record length is 112.When this occurs the source file open in VS Code still contains the correct code so I've been luck that I've been able to recover.
This happens very infrequently and I've not been able to pin down the exact circumstances.
Could it be the other members that I have open at the time? Possibly from a source file with a record length of 92? Could it be that I have open a mix of
**FREE
and non-free source members open? I also often have RPGLE source files from a local repository open at the same time.Beta Was this translation helpful? Give feedback.
All reactions