C/C++

  • 1.  What is SRCfile() function in ILE C++ Compiler?

    Posted Thu July 25, 2024 09:00 PM
    ILE C++ is a compiler produced by IBM , The compiler has a function called SRCfile.
    SRCfile() is defined as follows by IBM :
    "The name of the file that you reference on the #include directive in the source program.
    The output file is generated in the Data Management file system."

    Can you explain more about :

    What is SRCfile function and how it is related to "the Data Management file system" please?

    Thank you



    ------------------------------
    Ehsan F
    ------------------------------


  • 2.  RE: What is SRCfile() function in ILE C++ Compiler?

    Posted 27 days ago

    Since this is related to the IBM i platform, you may want to ask the question in IBM i - Home - IBM Power Community

    Here is feedback from what I asked your question in an internally IBM forum:

    I might need more information to answer authoritatively. There is an option to the compiler called SRCFILE() that would look like this on the command line:
    CRTCPPMOD SRCFILE(LIB/FILE)
    The option allows the user to specify the library and source physical file in the data management file system that contains the source code they are trying to build. The option is described here:
    https://www.ibm.com/docs/en/i/7.5?topic=options-srcfileIBM i has two primary ways to access files, the Integrated File System (IFS) and the Data Management file system. This section in the Programmer's Guide might help explain how source code ends up in a DM file.
    https://www.ibm.com/docs/en/i/7.5?topic=program-entering-source-statements#entering_source


    ------------------------------
    JC Yao
    ------------------------------