Code Monkey home page Code Monkey logo

Comments (7)

chrjorgensen avatar chrjorgensen commented on June 1, 2024 1

A late but hopefully useful addition to this discussion... ;-)

You can easily compile from IFS - no need for copying to a traditional source file before compile.
Most compile commands have now a parameter SRCSTMF where you specify the streamfile in the IFS.
All RPG, COBOL, CL, CMD create commands have this.

If the CRT command does not have the SRCFILE parameter, you can use the excellent utility from Brian Garland called CRTFRMSTMF. This allows compilation of DDS (DSPF, PF, LF), PNLGRP etc.

Once I started using the IFS and git on my IBM i source I never looked back. :-)

from vscode-ibmi-languages.

barrettotte avatar barrettotte commented on June 1, 2024 1

@chrjorgensen @mlstoppa Hello, it has been a while. Recently a new IBM i extension has been created at https://github.com/halcyon-tech/code-for-ibmi .

This extension provides the ability to browse/edit source on the IFS or QSYS file systems, compile source, and more. Its still in development, but I feel that it is in a very good place right now.

from vscode-ibmi-languages.

barrettotte avatar barrettotte commented on June 1, 2024

Thanks for taking the time to ask, yeah that's the unfortunate part of using VS Code at the moment. In the older "library" method of file structures there's not a simple solution for it.

I think a lot of it has to do with record lengths and EBCDIC encoding. This is actually a problem I'm trying to tackle in a side project I've been casually working on. In the next year I hope to complete a dotnet core project to provide a simple IBMi CLI to use with VS Code's terminal. Unfortunately, I don't have anything I can share at the moment. Using the IFS with VS Code is the only method of editing that I am aware of at the moment.

As a temporary workaround, I've used CPYTOSTMF and CPYFRMSTMF in a workflow like this:

  1. Copy source member to temporary file on IFS with CPYTOSTMF FROMMBR('QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR') TOSTMF('/home/MYUSER/edit/MYMBR.RPGLE')

  2. Edit temporary IFS file using VS Code

  3. Copy temporary file back to source member with CPYFRMSTMF FROMSTMF('/home/MYUSER/edit/MYMBR.RPGLE') TOMBR('QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR') MBROPT(*REPLACE)

However, this still requires the usage of the IFS and doesn't really give you a good solution for your situation.

Thanks for reaching out, I'm going to leave this issue open because I'm sure there are others that are wondering the same thing.

from vscode-ibmi-languages.

mlstoppa avatar mlstoppa commented on June 1, 2024

Hi,
Thank you for answering.

Your proposal is the same I thought of, so I think I will end by using it. Only, can you compile from a source file in the IFS or am I obliged to copy the source member back?

If it is of any interest to you, I know that at least one of two non-IBM IDE for RPG sources (ILEditor 2 by Liam Allan) uses SSH to read/write to native library files, but I'd like to work with only one editor, if possible.

Thanks for keeping this topic open.

from vscode-ibmi-languages.

barrettotte avatar barrettotte commented on June 1, 2024

Yeah I tried out ILEditor (1) and ILEditor 2 for a bit, but I also like the "all in one" editor concept that VS Code promotes. I was really hoping ILEditor 2 was going to be a VS Code extension of some sort...

As far as compiling from the IFS, I started to learn the concepts from https://github.com/NielsLiisberg/RPG-vsCode-Getting-Started . This uses GNU Make as part of the build process.

Personally, I don't like messing around with Make files very much so I opted to start using Bash scripts instead. Using Bash also allows you to skip over installing GNU Make and I find it a little more intuitive to work with.

Here are a couple example repos where I build entirely from the IFS:

I have a gist of a "generic" build script, but it is far from perfect...I hope to revisit it in the future
https://gist.github.com/barrettotte/278e1e97fc2ba23c7ad6366b0b4c8668 .

There are probably better methods out there somewhere for building. Niels Liisberg and Liam Barry are the two people I've seen that share some interesting stuff revolving around development using the IFS

from vscode-ibmi-languages.

mlstoppa avatar mlstoppa commented on June 1, 2024

Great suggestions. Thank you

from vscode-ibmi-languages.

barrettotte avatar barrettotte commented on June 1, 2024

closing since https://github.com/halcyon-tech/code-for-ibmi solves this issue.

from vscode-ibmi-languages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.