This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VS Code - ZMF Explorer - download copybooks

Hi,

The included copybooks are not getting downloaded and I'm in the dark where the problem could be.

Scenario

- In created a package and checked out a component using the ISPF dialog

- I connected with VS Code to the package

- I locked the component and then I clicked on the component

a) I don't get a 'popup' with the request to download the copybooks

b) the z Open Editor is unable to resolve the copybooks

Any idea what could be the problem?

Thank you

Johan

Labels:

Changeman ZMF
  • 0  

    Hi Johan,

    The discovery and downloading of copybooks requires the source/copybook relationships to be known to ZMF (i.e. to have records in the pkg master which link the copybooks to the source component). These records are generated when a source component is built by a ZMF procedure, the program CMNWRITE is usually responsible for generating these pkg master records.

    I've never worked with Visual Basic on the mainframe but it sounds to me like there may be no z/OS hosted build process for this kind of source ?

    In your scenario above you would need an extra step after 'checkout', i.e. 'build the source'    

    Would this explain your lack of downloaded copybooks ?

    All the best - Steve   

  • 0

    Hi,

    It is only when I simply activate the exit SYSL01XL that I'm being prompted to download the copybooks

    FYI : the library type is SRC, the language PLI, in the exit I'm only hanging the language for a couple of non-source components that contain ISPF components (REXX, etc.)

    Johan

  • 0   in reply to 

    I'm a bit confused about the scenario in question. The title of this discussion item references VBS code - which I took to be Visual Basic code, but you say it is actually PL/1. So is the VBS reference irrelevant or does it refer to something else pertinent to the discussion ?  Ah! lightbulb moment! it should say VS Code not VBS Code ?   Sorry, I got hung up on the VBS bit.

    To be clear, you have built the PL/1 source and CMNWRITE has detected (and reported) the included copybooks it has found - correct ?

    Once the build has been completed successfully you have attempted to retrieve the source and its registered (by CMNWRITE) copybooks but there is no prompt to get the copybooks unless SYSL01XL is active ?

    I can think of no reason why that might happen.

    Once you have verified my understanding of the problem I will attempt a recreation here. If I can't recreate I may have to ask you for output from the build, output from xml listing the ISIC records.

    But let's make sure I understand first :-)

    Thanks

  • 0 in reply to   

    Hi Steve,
    My mistake the spellchecker played a trick with me, It is in VSCode and not VBS Code
    Would it be possible for someone to change this in the title of th discussion?

    To make it all more understandable, all actions described here are done via the ZMF Explorer in VS Code

    1. I checked out a component from the baseline to a package

    2. I lock the component

    3. I click on the component

    Now here starts the strange thing, sometimes I'm getting a popup with the request to download the copybooks, but sometimes I don't

    So I'm trying to understand why sometimes the popup appears and (most of time) it doesn't

    Thank you

    Johan

  • 0   in reply to 

    I changed the title to VS Code :-)   

    In your steps for recreation you have never explicitly mentioned building the component ?   That may be because you have assumed this step ?  But can you confirm that you have built the source component successfully before attempting to use VS Code to download it and its copybooks ?   Also, when the prompt for copybooks doesn't happen can you look at the build output to make sure that copybooks have been successfully detected (by CMNWRITE) ?

  • 0 in reply to   

    Hi Steve,

    Ok, I'm starting to understand it.

    When a component is in check status, it assumes the copybooks through the relationship in the package master of the baselined component
    When it is in the package and it is ACTIVE and I edit it again it will use the ones present for that package

    And indeed I'm getting the popup in both of these cases.

    But this is not correct .... I'm a developer and changing my code via VS Code, at a certain point I check it back in to save my intermediate work into Changeman. By doing so the local copy and the copybooks are being removed. When I click on the component again, the popup does not appear and I'm unable to perform a proper editing as the copybooks were not retrieved

    Johan

  • 0   in reply to 

    OK, understood Johan. I will have to discuss this with David - more later...

  • 0   in reply to 

    When a component is downloaded to the local machine,  the user is prompted whether to also bring down any associated copybooks.  

    The sole purpose is to allow z/Open Editor (or whatever Editor is being used) to resolve copy statements in the code otherwise unknown reference errors will occur.

    When the component is checked back into the package, the component and its copybooks are removed from the local machine. This is to ensure that all local copies are cleaned up.

    If the user wishes to bring the component down a second time, the process is repeated.

    There is a separate option to right click a component in the tree structure to retrieve a component's copybooks,

    Please be aware that when a source file is being viewed/edited in the right side of the VSCode panel, the ZMF Explorer is not involved in that process, so any errors etc that may be reported in the source file are from the chosen editor. The ZMF Explorer is not aware of what editor is in use.

    Control is only returned back to the ZMF Explorer when some further action is taken in the left side tree structure.

  • 0 in reply to   

    Hi David,

    I have a various of cases and the scenario is not determined to pinpoint

    1. Sometimes when I click on the component the popup to download the copybook appears

    2. Sometimes the popup doesn't show and no copybooks retrieved

    3. The option when you right click 

         - not present

         - present

         - present, but greyed out

    - Regarding the left side and right side that is fully understood and quit normal

    My main question is regarding the algorithm that drives the retrieval of the copybooks. I have been trying all kinds of sequences and I'm simply not able to understand why sometimes it works and sometimes it doesn't.

    Johan

  • 0 in reply to 

    Hi David, Steve,

    OK, I have figured it all out, based on the initial reply of Steve 

    "The discovery and downloading of copybooks requires the source/copybook relationships to be known to ZMF (i.e. to have records in the pkg master which link the copybooks to the source component). These records are generated when a source component is built by a ZMF procedure, the program CMNWRITE is usually responsible for generating these pkg master records."

    This puts in a bit of a weird situation ...
    1. The developer checks the source back into the package
    2. Due to this the source becomes incomplete
    3. I cancel the build that succeeds it.
    4. The copybooks can no loner be downloaded (option is not available)
    5. I build the code and it becomes active
    6. After a refresh of the interface the option is available again.

    What if the component build failed, I'm no longer able to retrieve the copybooks and I lose the capabilities of the editor
    What if I did a simple intermediate checkin, just to save the version into the package and continue my work later on

    Is my above assumption on how it all works correct?

    Thank you

    Best regards

    Johan