Sorry, you do not have permission to ask a question, You must login to ask a question.

Sorry, you do not have permission to ask a question.

brainchime.com

brainchime.com

brainchime.com Navigation

  • Home
  • About Us
  • Contact Us

Mobile menu

Close
  • Home
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags

brainchime.com Latest Questions

Admin
Admin
Asked: October 13, 20242024-10-13T06:59:25+05:30 2024-10-13T06:59:25+05:30In: IBM i

how to create ifs folder in as400?

How can we create an ifs folder (ifs directory) in a400? What do they store? Can we keep multiple folders (directories) inside an ifs folder (directory), or only store different files?

as400ifs
  • 0
  • 0
  • 11
  • 5
  • Share
    • Share on Facebook
    • Share on Twitter
    • Share on LinkedIn
    • Share on WhatsApp

Related Questions

  • what is level check error and how to resolve level check error?
  • What are AS400 systems. Please provide a introduction of AS400 systems?
  • Is there any online server available for practicing on AS400 system?
  • What are the menus available in AS400?
  • What is subsystem in AS400?
  • How to copy a save file from IFS to a library?
  • How to transfer savf from as400 to pc?
  • How to copy ifs file to another directory?
  • How to copy savf from ifs to pc?
  • How to copy ifs file to physical file?
  • How to copy save file to ifs?
  • How to copy spool file to ifs?
  • How to copy physical file to ifs?
  • How to copy file from pc to IFS?
  • How to download spool file from AS400?
  • How do I delete a library in AS400?
  • How do I copy data from AS400 to excel?
  • What is library in AS400?
  • How to find all the source physical file available in AS400?
  • How to find all libraries in AS400?
  • How to change the library list in AS400?
  • What is access path in AS400?
  • What is the difference between source physical file and physical file in as400?
  • how to find the source file of an object in as400?
  • how to change record length of source physical file in as400?
  • What is cpf4174 error in as400?
  • What is the use of varying keyword in rpgle?
  • What is DDS in AS400?
  • What is the difference between PF and LF in as400?
  • Why do we use CHGPF command in AS400?
  • how to create physical file in as400?
  • What are the data types supported by physical files in AS400?
  • how to add data in physical file in as400?
  • how to view journal entries in as400?
  • what is the use of ovrdbf in as400?
  • What is an array in AS400?
  • what is a data queue in as400 and why do we use data queue?
  • How to run stored procedure in AS400?
  • How to resolve session and device error in AS400?
  • how to check as400 system values?
  • How to check triggers on a file in as400?
  • How to find damaged objects in AS400?
  • what is module in as400?
  • How to create binding directory in as400?
  • What is ASP in AS400?
  • What is JOBQ and how to create a JOBQ in AS400?
  • What is PSDS in AS400?
  • What is SEU in AS400 and why do we use it?
  • What is the multi-format logical file in AS400?
  • what is PR and PI in rpgle?
Leave an answer

Leave an answer
Cancel reply

Browse
Browse

Choose from here the video type.

Put Video ID here: https://www.youtube.com/watch?v=sdUUx5FdySs Ex: "sdUUx5FdySs".

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Admin
    Admin
    2024-10-13T07:04:49+05:30Added an answer on October 13, 2024 at 7:04 am

    We can create an ifs folder using System I Navigator. Follow the below steps to create an ifs folder in the as400 machine.

    1. Open the System i Navigator.
    2. Click on the plus symbol (+) next to the Server (IP or domain).
    3. After node expansion, Click on the plus symbol (+) next to File Systems.
    4. After node expansion, Click on the plus symbol (+) next to Integrated File System.
    5. After node expansion, Click on Root.
    6. A dialog for creating a New folder appears, enter the new folder name in the respective field and click OK, leaving other fields as it is.

    The Ifs folder is the ifs directory. So, we can create an ifs directory from the server end. Use the mkdir (make directory) command to create an ifs folder(directory) in the AS400 system.

    Type MKDIR on the command line, then press F4. Enter your new folder name, including the complete path back to the root.

    mkdir () API can create a new or sub-directory in the IFS. mkdir() is make directory API. The prototypes in C and RPG language for mkdir() API are as follows:

    C prototype of mkdir():

    int mkdir(const char *path, mode_t mode)

    RPG prototype of mkdir() in fixed format:

         D mkdir           PR            10I 0 ExtProc('mkdir')               
         D  dirpath                        *   Value options(*string)         
         D  mode                         10U 0 Value    

    RPG prototype of mkdir() in fully free format:

    DCL-PR mkdir int(10) EXTPROC('mkdir');       
      dirpath pointer VALUE options(string);    
      mode uns(10) VALUE;                        
    END-PR;

    mkdir() accepts two parameters and returns an integer value.

    • Path parameter where we specify the folder/directory to be created.
    • The mode parameter is the access permissions assigned to the directory during creation.
    • mkdir() API returns -1 if the API call fails and 0 if it’s successful.

    Here is the RPG code in fixed format to create an ifs folder in as400.

         HDFTACTGRP(*NO)                                                      
         D mkdir           PR            10I 0 ExtProc('mkdir')               
         D  dirpath                        *   Value options(*string)         
         D  mode                         10U 0 Value                          
          *                                                                   
         D errorifs        PR              *   ExtProc('__errno')             
          *                                                                   
         D strerror        PR              *   ExtProc('strerror')            
         D error_num                     10I 0 value                          
          *                                                                   
         Dreturn_mkdir     s             10i 0 inz                            
         D dirpath         s            512a   inz                            
         D mode            s             10U 0 inz                            
                                                                              
         Derror_ptr        S               *                                  
         Derror_num        S             10I 0 based(error_ptr)               
                                                                              
         Derrormsg_ptr     S               *                                  
         Derror_msg        S             50a   based(errormsg_ptr)            
                                                                                   
          *                                                         
          * owner,group,other (RWX)                                                
          *                                         owner authority                
         D M_readowner     C                   256                                 
         D M_writeowner    C                   128                                 
         D M_executeowner  C                   64                                  
          *                                         group authority                
         D M_readgroup     C                   32                                  
         D M_writegroup    C                   16                                  
         D M_executegroup  C                   8                                   
          *                                         other people                   
         D M_readother     C                   4                                   
         D M_writeother    C                   2                                   
         D M_executeother  C                   1                                   
          *                                                                        
         C                   EVAL      dirpath = '/home/developer/dir1'            
         C                   EVAL      mode = M_readowner +                        
         C                                    M_writeowner                         
         C                   EVAL      return_mkdir = mkdir(%trim(dirpath):mode)   
         C                   IF        return_mkdir < 0                   
         C                   EVAL      error_ptr = errorIFS()              
         C                   EVAL      errormsg_ptr = strerror(error_num)  
         C     error_msg     DSPLY                                         
         C                   RETURN                                        
         C                   ELSE                                          
         C     'DIR1 CREATED'DSPLY                                         
         C                   ENDIF     

    Here is the RPG code in free format to create an ifs folder in as400.

         HDFTACTGRP(*NO)                                               
         D mkdir           PR            10I 0 ExtProc('mkdir')        
         D  dirpath                        *   Value options(*string)  
         D  mode                         10U 0 Value                   
          *                                                            
         D errorifs        PR              *   ExtProc('__errno')      
          *                                                            
         D strerror        PR              *   ExtProc('strerror')     
         D error_num                     10I 0 value                   
          *                                                            
         Dreturn_mkdir     s             10i 0 inz                     
         D dirpath         s            512a   inz                     
         D mode            s             10U 0 inz                     
                                                                       
         Derror_ptr        S               *                           
         Derror_num        S             10I 0 based(error_ptr)        
                                                                       
         Derrormsg_ptr     S               *                           
         Derror_msg        S             50a   based(errormsg_ptr)     
                                                                          
          * <-----mode---->                                               
          * owner,group,other (RWX)                                       
          *                                         owner authority       
         D M_readowner     C                   256                        
         D M_writeowner    C                   128                        
         D M_executeowner  C                   64                         
          *                                         group authority       
         D M_readgroup     C                   32                         
         D M_writegroup    C                   16                         
         D M_executegroup  C                   8                          
          *                                         other people          
         D M_readother     C                   4                          
         D M_writeother    C                   2                          
         D M_executeother  C                   1                          
          *                                                               
          /Free                                                           
           dirpath = '/home/developer/dir1';                              
           mode = M_readowner +                                           
                  M_writeowner ;                                          
                                                         
           return_mkdir = mkdir(%trim(dirpath):mode);    
           if return_mkdir < 0;                         
             error_ptr = errorIFS();                     
             errormsg_ptr = strerror(error_num);         
             DSPLY error_msg;                            
             return;                                     
           else;                                         
             DSPLY 'DIR1 CREATED';                       
           endif;                                        
          /End-Free           

    Here is the fully free RPG code to create an IFS folder in AS400.

    **FREE                                       
    CTL-OPT DFTACTGRP(*NO);                      
                                                 
    DCL-PR errorifs pointer EXTPROC('__errno');  
    END-PR;                                      
                                                 
    DCL-PR strerror pointer EXTPROC('strerror'); 
      error_num int(10) VALUE;                   
    END-PR;                                      
                                                 
    DCL-PR mkdir int(10) EXTPROC('mkdir');       
      dirpath pointer VALUE options(*string);    
      mode uns(10) VALUE;                        
    END-PR;                                      
                                                 
    DCL-S return_mkdir int(10) inz;              
    DCL-S dirpath CHAR(512);                     
    DCL-S mode  uns(10);                         
                                                 
    DCL-S error_ptr pointer;                                        
    DCL-S error_num int(10) based(error_ptr);                       
    DCL-S errormsg_ptr pointer;                                     
    DCL-S error_msg char(50) based(errormsg_ptr);                   
                                                                    
    //    *                                         
    //    * owner,group,other (RWX)                                 
    //    *                                         owner authority 
    DCL-C M_readowner 256;                                          
    DCL-C M_writeowner 128;                                         
    DCL-C M_executeowner 64;                                        
    //    *                                         group authority 
    DCL-C M_readgroup 32;                                           
    DCL-C M_writegroup 16;                                          
    DCL-C M_executegroup 8;                                         
    //    *                                         other people    
    DCL-C M_readother 4;                                            
    DCL-C M_writeother 2;                                           
    DCL-C M_executeother 1;                                         
                                                                    
           dirpath = '/home/developer/dir1';          
           mode = M_readowner +                       
                  M_writeowner ;                      
                                                      
           return_mkdir = mkdir(%trim(dirpath):mode); 
           if return_mkdir < 0;                      
             error_ptr = errorIFS();                  
             errormsg_ptr = strerror(error_num);      
             DSPLY error_msg;                         
             return;                                  
           else;                                      
             DSPLY 'DIR1 CREATED';                    
           endif; 
           return;
      • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp

Sidebar

Statistics

  • Questions 143
  • Answers 177
  • Comments 0
  • Popular
  • Answers
  • Admin

    Why do we use OVERLAY keyword in data structure subfields ...

    • 12 Answers
  • Admin

    How to call sql stored procedure with output parameter from ...

    • 6 Answers
  • Admin

    How to use declare global temporary table statement in RPGLE?

    • 5 Answers
  • Admin
    Admin added an answer CPF4131 is a record format level check error. This indicates… October 18, 2024 at 1:58 am
  • Admin
    Admin added an answer To open the command prompt with administrator rights you can… October 17, 2024 at 12:27 am
  • Admin
    Admin added an answer In AS400, "AS" stands for Application system. This article discusses… October 13, 2024 at 12:49 pm

Related Questions

  • Admin

    what is level check error and how to resolve level ...

    • 1 Answer
  • Admin

    What are AS400 systems. Please provide a introduction of AS400 ...

    • 1 Answer
  • Admin

    Is there any online server available for practicing on AS400 ...

    • 1 Answer
  • Admin

    What are the menus available in AS400?

    • 1 Answer
  • Admin

    What is subsystem in AS400?

    • 1 Answer

Trending Tags

.htaccess (1) as400 (123) bing-webmaster (2) control-language (12) db2 (33) ftp (8) google-adsense (1) google-search-console (3) https-redirect (1) iasp (4) ifs (22) jar (4) operations (3) php-my-admin (1) qshell (3) robots.txt (4) rpg (26) stored-procedure (3) stroed procedure (1) triggers (1) yoast (4)

Explore

  • Home
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags

Footer

BrainChime

BrainChime is a blog that posts question-and-answer-based format articles on diverse topics and engages in discussions by allowing people to provide answers/comments without the need to register and log in.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • FAQs
  • Categories
  • Tags

© 2024 BrainChime. All Rights Reserved
by BrainChime.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.