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
  • Recent Questions
  • Most Answered
  • Answers
  • Most Visited
  • Most Voted
  • No Answers
  • Random
  • New Questions
  1. Asked: October 6, 2024In: IBM i

    What is Authorization list. What are the command of authorization list?

    Admin
    Admin
    Added an answer on October 6, 2024 at 2:42 pm

    An authorization list defines the user authority for the objects in the list. When an object is created associate it with the authorization list so that we should not create individual objects with private authorities and should be getting authority based on the authorization list. It controls the iRead more

    An authorization list defines the user authority for the objects in the list. When an object is created associate it with the authorization list so that we should not create individual objects with private authorities and should be getting authority based on the authorization list. It controls the individual and *PUBLIC authority to all the objects in the authorization list.

    Authorization list commands:

    CRTAUTL: This command creates the authorization list.
    CRTAUTL AUTL(ListName)

    GRTOBJAUT: This command allows you to associate the authorization list with the files.
    GRTOBJAUT OBJ(libname/*ALL) OBJTYPE(*FILE) AUTL(listname)
    If you run the above command, you are going to add all the files in the specified library to the authorization list ListName.

    ADDAUTLE: This command allows you to grant users authority to the lists.
    ADDAUTLE AUTL(ListName) USER(ADMIN) AUT(*USE)
    If you run the above command, you are going to provide *USE authority to user ADMIN for the authorization list ListName.

    EDTAUTL: This command allows you to add and remove users from the list and specify their authority to the list.

    DLTAUTL: This command allows you to delete an authorization list.

    DSPAUTL: This command allows you to display an authorization list.

    WRKAUTL: This command allows you to work with authorization lists. Using this command you can display, delete, edit, display the list objects, or change the text for an authorization list.
    WRKAUTL AUTL(*ALL)
    The above command displays all of the authorization lists that you own or have the authority to view.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: October 6, 2024In: IBM i

    How to download a zip file from IFS to desktop using the command prompt?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:56 pm

    You may first open the command prompt on your Windows PC and run the following commands: cd desktop to change the current directory to the desktop so that your file can be downloaded on the desktop. FTP systemname (system name or IP address of your IBM i machine) User id (of the IBM i machine) PasswRead more

    You may first open the command prompt on your Windows PC and run the following commands:

    • cd desktop to change the current directory to the desktop so that your file can be downloaded on the desktop.
    • FTP systemname (system name or IP address of your IBM i machine)
    • User id (of the IBM i machine)
    • Password (of the IBM i machine)
    • quote site namefmt 1
    • get /ifspath/Zipfile.zip
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  3. Asked: October 6, 2024In: IBM i

    Why am I getting error CPF2407 when running IBM i code coverage command CODECOV?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:50 pm

    Please add the QDEVTOOLS library to your library list at the top. Then try to run your program again. ADDLIBLE LIB(QDEVTOOLS) POSITION(*FIRST)

    Please add the QDEVTOOLS library to your library list at the top. Then try to run your program again.
    ADDLIBLE LIB(QDEVTOOLS) POSITION(*FIRST)

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: October 6, 2024In: IBM i

    What are the characters that are supported by 128 bar codes?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:36 pm

    Valid supported characters by 128 bar codes are: Code 128A: 0-9, A-Z, special characters Code 128B: 0-9, A-Z, a-z, special characters Code 128C: 0-9 only

    Valid supported characters by 128 bar codes are:
    Code 128A: 0-9, A-Z, special characters
    Code 128B: 0-9, A-Z, a-z, special characters
    Code 128C: 0-9 only

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. Asked: October 6, 2024In: IBM i

    How to use OPNQRYF to perform a substring on a date field?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:33 pm

    To perform a substring on a date field, you will first have to cast the field to a string. This can be done using %char. The below example will convert the date field to ISO DATEFMT first and then cast it to the character. After that, the substring (%sst) function is applied. %sst(%char(datefield "IRead more

    To perform a substring on a date field, you will first have to cast the field to a string. This can be done using %char.

    The below example will convert the date field to ISO DATEFMT first and then cast it to the character. After that, the substring (%sst) function is applied.

    %sst(%char(datefield "ISO") 1 4) *EQ '1980'

    Now use it with OPNQRYF

    OPNQRYF
    FILE(libname/filename)
    QRYSLT((%sst(%char(datefield "ISO") 1 4) *EQ '1980'))

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  6. Asked: October 6, 2024In: IBM i

    Why am I getting error ASP device *SAVASPDEV not correct when running RSTLIB comamnd?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:29 pm

    Here, As you mentioned the restore to the library was found on an auxiliary storage pool (ASP) different than the one specified by the RSTASPDEV and RSTASP parameters. Therefore, you need to pass the correct value for these RSTASPDEV and RSTASP parameters so that the RSTLIB gets successful in restorRead more

    Here, As you mentioned the restore to the library was found on an auxiliary storage pool (ASP) different than the one specified by the RSTASPDEV and RSTASP parameters.

    Therefore, you need to pass the correct value for these RSTASPDEV and RSTASP parameters so that the RSTLIB gets successful in restoring the library from the ASP device to *SYSBAS.

    So, what you can do is you can either specify the name of the ASP device to restore the library using the RSTASPDEV() parameter or you can specify the ASP device number using the RSTASP() parameter.

    RSTASPDEV() parameter us the ASP device name and that may be on some other system. Therefore, you may not want to use this parameter. You can find out the ASP device name the library was saved from just taking F16 i.e. SHIFT + F4 from the DSPSAVF command and look at the header information after pressing PAGE dOWN one time. ASP info is present under the Data Saved.

    To restore to *SYSBAS i.e. *SYSTEM asp you can specify the ASP number in the RSTASP() parameter which is 1.

    RSTLIB SAVLIB(libraryonASPdevice)
    DEV(*SAVF)
    SAVF(testlib/savf1)
    RSTLIB(LibraryonSysbas)
    RSTASP(1)

    when the specified ASP number is 1, then the specified objects are restored to the system ASP, and when the specified ASP is 2 through 32, then objects are restored to the basic user ASP specified.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  7. Asked: October 6, 2024In: IBM i

    How to find IFS object locks?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:22 pm

    You can find any locks on an IFS object using the QP0FPTOS API. You can run this API from the command line with QSECOFR or any profile with *SERVICE special authority. CALL PGM(QP0FPTOS) PARM(*LSTOBJREF 'ifspathofObject' *FORMAT2) This command will output a spool file that tells any locks held for tRead more

    You can find any locks on an IFS object using the QP0FPTOS API. You can run this API from the command line with QSECOFR or any profile with *SERVICE special authority.

    CALL PGM(QP0FPTOS) PARM(*LSTOBJREF 'ifspathofObject' *FORMAT2)

    This command will output a spool file that tells any locks held for the object. After the program runs you will see the message: The dump request has completed. The latest spooled file QSYSPRT with user data QP0FDUMP has the dump.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  8. Asked: October 6, 2024In: IBM i

    How to search an IFS folder for a string within documents?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:18 pm

    You can do this from Qshell on IBM i. To start the QSHELL, type STRQSH from the command line, and the QSH command entry screen will open. Now you can use the following command to search an IFS folder for a string within documents or files. QSH IFS search command: grep -F -R -i "search string" /ifsfoRead more

    You can do this from Qshell on IBM i. To start the QSHELL, type STRQSH from the command line, and the QSH command entry screen will open. Now you can use the following command to search an IFS folder for a string within documents or files.

    QSH IFS search command:

    grep -F -R -i "search string" /ifsfolder

    grep command searches for a pattern in a file and writes each matching line to standard output. -F tells it to search for a flat string as opposed to a regular expression. -R tells it to search all files and subdirectories of the directory given. -i mean case-insensitive. Leave this if you want to match the upper or lower case exactly. You can get more info about the grep command here.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  9. Asked: October 6, 2024In: IBM i

    How to identify the files that have the value for a field automatically generated by an identity?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:13 pm

    If you want to get the list of all the files in a library with a field whose value is automatically generated by an identity, i.e., an identity column defined, then you can use the following SQL query. select table_schema, table_name, column_name, data_type, length, numeric_scale, identity_generatioRead more

    If you want to get the list of all the files in a library with a field whose value is automatically generated by an identity, i.e., an identity column defined, then you can use the following SQL query.

    select table_schema, table_name, column_name, data_type, length,
    numeric_scale, identity_generation
    from syscolumns
    where table_schema = 'LibName' and is_identity = 'YES'

    You can then create a cursor out of this query in your SQLRPGLE program and perform your further tasks.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  10. Asked: October 6, 2024In: IBM i

    Is there any JAR file for viewing IBM i save files on your PC?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:07 pm

    I once came across a Jar file for viewing the IBM i save files on your Windows PC namely _jSAVF JAR file which is a tool created for handling IBM i save files (SAVF) on a PC. It allows us to view, extract, and manage the contents of the save files directly from the desktop. Please note that _JSAVF iRead more

    I once came across a Jar file for viewing the IBM i save files on your Windows PC namely _jSAVF JAR file which is a tool created for handling IBM i save files (SAVF) on a PC. It allows us to view, extract, and manage the contents of the save files directly from the desktop.

    Please note that _JSAVF is not an official IBM product, therefore it may not be available directly from IBM’s website. It may be often distributed through community resources or forums related to IBM i (AS400) or third-party vendors. You might get this JAR available on the internet.

    But if you get this JAR by any means then you can easily run it and you have to ensure that the Java runtime environment (JRE) is installed before running this Jar file as it’s a Java application.

    You can run it either by the _jSAVF JAR GUI and you can use it to open the SAVF files and view their contents on the desktop.

    You can also run it from the command prompt or terminal window. First, navigate to the directory where you downloaded the _jSAVF JAR file, and then execute the JAR file using the following command.
    java -jar _jSAVF.jar
    please make sure to check the documentation that comes with the _jSAVF JAR file for the instructions to use.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  11. Asked: October 6, 2024In: IBM i

    How to share the IFS folder?

    Admin
    Admin
    Added an answer on October 6, 2024 at 1:01 pm

    You can share using Operations Navigator. Let’s suppose we have created an IFS folder sharedfiles, and I want to share it so that it will be available on my Windows PC. Sharing using the operations navigator: Open the Operations Navigator. Expand My Connections. expand the IBM i system (pub400.com oRead more

    You can share using Operations Navigator.

    Let’s suppose we have created an IFS folder sharedfiles, and I want to share it so that it will be available on my Windows PC.

    Sharing using the operations navigator:

    • Open the Operations Navigator.
    • Expand My Connections.
    • expand the IBM i system (pub400.com or xxx.xxx.xx.xxx).
    • Expand File Systems
    • Right-click on File Shares under Integrated File System.
    • Select New and then Select File Share….
    • A dialog to create the new file share will be prompted.
    • Enter a share name sharedfiles.
    • Change the Access to Read/Write.
    • Set the Path name such as /home/admin/sharedfiles.
    • Click the OK button.
    • A share name entry will be created.

    How to map the folder to the Windows PC:

    • Select the Start button.
    • Search for file explorer.
    • Right-click on it and select Map Network Drive.
    • The dialog will appear.
    • Choose one Drive letter that is not used. Assume we selected the drive letter Z.
    • For the Folder enter the path to the IFS folder which is /home/admin/sharedfiles.
    • Uncheck the Reconnect at sign-in checkbox since Windows and IBM i sign-on details may be different.
    • Check the Connect using different credentials checkbox.
    • Click on the Finish button.
    • The Enter Network Password dialog appears.
    • Enter your IBM i username and password here and you may check  Remember my credentials at your convenience.
    • Click OK.
    • Finally, Z: drive is mapped to the IFS folder /home/admin/sharedfiles.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  12. Asked: October 6, 2024In: IBM i

    Why batch job on IBM i system stops with MSGW if can't create more spool files?

    Admin
    Admin
    Added an answer on October 6, 2024 at 12:38 pm

    You can set the QMAXSPLF system value to 999999. You can see the QMAXSPLF system value by using the command DSPSYSVAL QMAXSPLF. You can change the QMAXSPLF system value by using the command CHGSYSVAL SYSVAL(QMAXSPLF) VALUE(999999).

    • You can set the QMAXSPLF system value to 999999.
    • You can see the QMAXSPLF system value by using the command
      DSPSYSVAL QMAXSPLF.
    • You can change the QMAXSPLF system value by using the command
      CHGSYSVAL SYSVAL(QMAXSPLF) VALUE(999999).
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  13. Asked: October 6, 2024In: SQL

    How can i access system36 files using SQL?

    Admin
    Admin
    Added an answer on October 6, 2024 at 12:22 pm
    This answer was edited.

    Because there is no external description for system36 files. Thus, all of that data is contained in a single field when you access the file in SQL. Therefore, when you want to use SQL to access data from a system36 file you need to substring the data you want from the field. For Example, if the SystRead more

    Because there is no external description for system36 files. Thus, all of that data is contained in a single field when you access the file in SQL. Therefore, when you want to use SQL to access data from a system36 file you need to substring the data you want from the field.

    For Example, if the System36 file name is FILE1, and its single field is FLD1 then you can use the below SQL to get data from system36 files, You can change substring positions at your end as per your system36 file.

    Select substr(fld1, 5, 4), substr(fld1,10,5) from FILE1
    where substr(fld1,1,4) = 'A001'

    Please note that you can get the field name of the system6 file by typing SQL select * from file1 and taking F4 to prompt the SQL query and then prompt the select fields.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  14. Asked: October 6, 2024In: SQL

    How to run SQL queries from text files using RUNSQLSTM?

    Admin
    Admin
    Added an answer on October 6, 2024 at 8:03 am

    You can use the RUNSQLSTM command instead of the STRSQL command over a text file stored in IFS and a source member present in the source file in a library. Please note that the queries that are not returning any result set should be placed inside the text files/source file members. If the SQL querieRead more

    You can use the RUNSQLSTM command instead of the STRSQL command over a text file stored in IFS and a source member present in the source file in a library. Please note that the queries that are not returning any result set should be placed inside the text files/source file members.

    If the SQL queries are written inside the source member present in the source physical file in a library, then use the RUNSQLSTM command as follows to execute the SQL queries at once.

    RUNSQLSTM SRCFILE(libname/srcpfName)
    SRCMBR(srcmbrName)
    COMMIT(*NONE)
    DFTRDBCOL(libname)
    DBGVIEW(*SOURCE)

    If the SQL queries are present in the text file on the IFS path, then use the RUNSQLSTM command as follows to execute the SQL queries at once from the text file on the IFS.
    RUNSQLSTM SRCSTMF(/home/admin/query_file.sql)
    COMMIT(*NONE)

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  15. Asked: October 6, 2024In: IBM i

    How can i save and restore IFS objects to and from save files?

    Admin
    Admin
    Added an answer on October 6, 2024 at 7:58 am

    You can use the following commands to save and restore an IFS object to and from the save file. Save IFS objects to save file (SAVF): SAV DEV('/qsys.lib/libname.lib/savefilename.file') OBJ(('/home/admin/files/test1.txt') ('/home/admin/files/test2.txt')) Here, We use the Save object (SAV) command andRead more

    You can use the following commands to save and restore an IFS object to and from the save file.

    Save IFS objects to save file (SAVF):
    SAV DEV('/qsys.lib/libname.lib/savefilename.file')
    OBJ(('/home/admin/files/test1.txt') ('/home/admin/files/test2.txt'))

    Here, We use the Save object (SAV) command and specify the save file name with the fully qualified path in the DEV parameter, In the OBJ parameter specifies the files test1.txt and test2.txt to be saved in the save file specified in the DEV parameter.

    Restore IFS objects from the save file (SAVF) to the same IFS path from where it Saved:

    RST DEV('/qsys.lib/libname.lib/savefilename.file')
    OBJ(('/home/admin/files/test1.txt')
    ('/home/admin/files/test2.txt'))
    CRTPRNDIR(*YES)

    Here, We use the Restore object (RST) command and specify the save file name with the fully qualified path in the DEV parameter, In the OBJ parameter specifies the files test1.txt and test2.txt to be restored from the save file specified in the DEV parameter. Also, the CRTPRNDIR parameter is *YES so that it would create a parent folder if not already exist.

    Restore IFS objects from the save file (SAVF) to the different IFS path from where it Saved:
    RST DEV('/qsys.lib/libname.lib/savefilename.file')
    OBJ(('/home/admin/files/test1.txt' *INCLUDE
    '/home/admin/files/restore/test1.txt')
    ('/home/admin/files/test2.txt' *INCLUDE
    '/home/admin/files/newfolder/test2.txt'))
    CRTPRNDIR(*YES)

    Here, We use the Restore object (RST) command and specify the save file name with the fully qualified path in the DEV parameter, In the OBJ parameter specifies the files test1.txt and after *INCLUDE specified the new object name/path and test2.txt and after *INCLUDE specified the new object name/path to be restored from the save file specified in the DEV parameter. Also, the CRTPRNDIR parameter is *YES so that it would create a parent folder if not already exist.

    Note: The new object/path will be created by the command RST itself. So, no need for new folders to exist before running the RST command.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  16. Asked: October 6, 2024In: IBM i

    How do i find the database name on the IBM i?

    Admin
    Admin
    Added an answer on October 6, 2024 at 7:52 am

    You can run this command on the IBM i command line: DSPRDBDIRE. The entry name corresponds to the Remote Location value of *LOCAL is the name of the database on your IBM i machine.

    You can run this command on the IBM i command line: DSPRDBDIRE.
    The entry name corresponds to the Remote Location value of *LOCAL is the name of the database on your IBM i machine.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  17. Asked: October 6, 2024In: SQL

    How can i use SQL if the IBM i does not have STRSQL installed?

    Admin
    Admin
    Added an answer on October 6, 2024 at 7:49 am

    In that situation, you can use System i Navigator. You can follow the below steps to  run SQL queries using System i Navigator instead of STRSQL. Start  System i Navigator and log in with the user ID and password. Go to My Connections -> Your System->Databases->Schemas. In the bottom rightRead more

    In that situation, you can use System i Navigator. You can follow the below steps to  run SQL queries using System i Navigator instead of STRSQL.

    1. Start  System i Navigator and log in with the user ID and password.
    2. Go to My Connections -> Your System->Databases->Schemas.
    3. In the bottom right panel of Databases tasks, you will see the option Run an SQL script.
    4. Click on it. The Untitled -Run SQL scripts- system name window opens and there you can type your SQL queries and run them. Please note that you must use .(dot) instead of /(slash) to qualify the library name with the file.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  18. Asked: October 6, 2024In: SQL

    How to use commitment control with DB2 SQL on IBM i?

    Admin
    Admin
    Added an answer on October 6, 2024 at 7:43 am

    Commitment control is by default enabled in IBM DB2 since the following statement cannot update a file update libname/filename set fld1 = 'test' where id = 1;. You need to add with NC to the end of the above statement to disable the commitment control and commit the update operation on the table immRead more

    Commitment control is by default enabled in IBM DB2 since the following statement cannot update a file

    update libname/filename set fld1 = 'test' where id = 1;.

    You need to add with NC to the end of the above statement to disable the commitment control and commit the update operation on the table immediately.

    update libname/filename set fld1 = 'test' where id = 1 with NC;

    For using commitment control you need to enable journalling on the files first. You can follow the below steps to enable the journalling of files.

    1. CRTJRNRCV: Create a journal reciever named jrnrcv0001 using this command.
      CRTJRNRCV JRNRCV(libname/JRNRCV0001)
    2. CRTJRN: Create a journal named JRN0000001 and attach the journal receiver JRNRCV0001 using this command.
      CRTJRN JRN(libname/JRN0000001) JRNRCV(libname/JRNRCV0001)
    3. STRJRNPF: Start journalling of files using a journal JRN0000001.
      STRJRNPF FILE(libname/filename) JRN(JRN0000001) IMAGES(*AFTER)

    Once the journalling is started on files and then if you perform any update to this file through your program, you must either commit or roll back the update before your program ends. If you do not do this then the lock on the file will remain present after the program ends. You can use COMMIT command to commit the changes and ROLLBACK command to roll back the last commit or simply rollback call for the operation done so far that were not yet committed.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  19. Asked: October 6, 2024In: SQL

    How to create an SQL function for calculating the number of business days between two dates?

    Admin
    Admin
    Added an answer on October 6, 2024 at 7:29 am

    Using SQL we can create a user-defined function (UDF) for calculating the number of business/working dates between two dates, similar to the NETWORKDAYS function for Microsoft Excel. Creating the SQL function: We can execute the following SQL code to create our SQL function. You can either run the bRead more

    Using SQL we can create a user-defined function (UDF) for calculating the number of business/working dates between two dates, similar to the NETWORKDAYS function for Microsoft Excel.

    Creating the SQL function:
    We can execute the following SQL code to create our SQL function. You can either run the below scripts from the Run SQL script option from IBM i Access client solutions (ACS) or on IBM i green screen, write the script within a source member of source type SQL at the location libname/srcpfname and then use RUNSQLSTM SRCFILE(libname/srcpfname) SRCMBR(srcmbrname) COMMT(*NONE) DFTRDBCOL(libname) DBGVIEW(*SOURCE) command to execute this script to create SQL function.

    create or replace function libname.workingday(startdate DATE,
    enddate DATE)
    returns INTEGER
    language SQL
    is deterministic
    begin
      declare workingday INTEGER default 0;
      declare tempdate DATE;
      set tempdate = startdate;
      while days(tempdate) <= days(enddate) do
        if dayofweek_iso(tempdate) <> 6 and
           dayofweek_iso(tempdate) <> 7 then
          set workingday = workday + 1;
         end if;
         set tempdate = date(days(tempdate) + 1);   
      end while;
      return workingday; 
    end; 

    Explanation of the code:
    Line 1 -2: Create and replace function workingday that accepts two parameters startdate and enddate of type date.
    Line 3: The SQL function returns an integer value which is the number of business/working days.
    Line 4-5: Language is SQL and it is deterministic i.e. it returns the same value on the same input dates each time.
    Line 6: begin of the function
    Line 7: Declare workingday variable of type integer and initialize with value 0.
    Line 8: Declare tempdate variable of type date.
    Line 9: set the value of tempdate as startdate.
    Line 10-16: Run the while loop until days of tempdate <= days of enddate. Days() function returns the integer representation of the date i.e. for Jan 1, 0001(0001-01-01) it returns 1, for (0001-01-02) it returns 2 and so on. Then we check if tempdate is not the 6th and 7th day of the week using DAYOFWEEK_ISO() function then we set the workingday as workingday + 1 i.e. increment by 1 and no increment when tempdate is the 6th and 7th day of the week. After end if; we increment the tempdate by 1 i.e. increment the number of days extracted from tempdate and convert back to date date(days(tempdate) + 1)and while loop end.
    Line 17: Return the workingday value.
    Line 18: end of function.
    Important Point:
    Once the function was created an object of the type *SRVPGM and attribute CLE was created in the specified library.

    How to call SQL function from Run SQL script ACS or STRSQL session on IBM i:

    select libname.workingday('2024-09-05','2024-09-10) from sysibm.sysdummy1
    

    the number of business/working days returned is 4. Since the 5th is Thursday and the 10th is Tuesday and there are total days in between these two dates are 6 and non-working days are 2 i.e. 7th and 8th (Saturday and Sunday) therefore working days are only 4.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  20. Asked: October 6, 2024In: SQL

    How to specify the database/ASP when using Run SQL script?

    Admin
    Admin
    Added an answer on October 6, 2024 at 7:03 am

    You can run SQL queries on files present in the library in an ASP device using 2 ways: Start the Schemas tool in IBM i Access client solutions (ACS) and run your SQL scripts from a specific database(ASP device) since each ASP device is a separate database. You need to right-click on the ASP device aRead more

    You can run SQL queries on files present in the library in an ASP device using 2 ways:

    1. Start the Schemas tool in IBM i Access client solutions (ACS) and run your SQL scripts from a specific database(ASP device) since each ASP device is a separate database. You need to right-click on the ASP device and select the option Run SQL Scripts and now you can run your SQL scripts on the selected ASP device on the IBM i machine.
    2. Another way is to start the Run SQL Scripts tools in IBM i Access client solutions (ACS) and under the Connections menu, select Connect to Database… dialog box appears, and select the database from the drop-down. There you notice all of your ASP devices present in the drop-down list. Select your ASP device and click OK. Run the SQL Script utility and start creating the new connection to the ASP device and now you will be able to run your SQL query and select file data from the library present on the selected iASP device.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  21. Asked: October 6, 2024In: IBM i

    How can i pass an integer variable to an RPG program from the command line?

    Admin
    Admin
    Added an answer on October 6, 2024 at 6:53 am

    You can use hexadecimal numbers to pass a numeric(integer) value to a parameter in the RPG program when calling it from the command line. Passing numeric value to a packed decimal numeric field in RPG: CALL PGM(PGM1) PARM((x'0001F') (x'00010F')) Here, the first parameter is a 3-length numeric fieldRead more

    You can use hexadecimal numbers to pass a numeric(integer) value to a parameter in the RPG program when calling it from the command line.

    Passing numeric value to a packed decimal numeric field in RPG:

    CALL PGM(PGM1) PARM((x'0001F') (x'00010F'))

    Here, the first parameter is a 3-length numeric field and passing value 1. The second parameter is a 4-length numeric field with and passing value of 10.

    To pass a hexadecimal field you must start with x after X within quotes, there must be an even number of positions including the F.

    So, passing value 1 to the numeric length 3 would be x’001F’ where F denotes a positive number and it is a signed bit. And as I remember we pass D for negative numbers.

    However, passing value 10 to numeric length 4 is not x'0010F' since inside single quotes 0010F is an odd number of digits. So the correct value would be x'00010F i.e. add an extra zero in front of the number to make it an even number of positions within single quotes including F after X.

    Just refer to some examples to understand it a little bit more,

    1. If you trying to pass value 5.2 to the decimal (3,1) field and 543 value to the decimal (3) field.
      CALL PGM(PGM1) PARM((5.2) (543))
      CALL PGM(PGM1) PARM((x'052F') (x'543F'))
    2. If you trying to pass value 254674 to the numeric parameter of length 6 field.
      CALL PGM(PGM1) PARM((254674)
      CALL PGM(PGM1) PARM((x'0254674F'))
      Add an extra 0 at the start of the number after x and within quotes so that to make it an even number of digits in the hex value being passed.

    Passing 4-byte integer value to integer (10I) field field in RPG:
    If you try to pass 1 and 10 respectively
    CALL PGM(PGM1) PARM((x'00000001') (x'0000000A'))
    Just refer to some other examples to understand it a little more:
    Passing value for 3I and 5I and 10I and 20I parameters in RPG

    1. passing value 10 to each 3I and 5I and 10I and 20I parameters in RPG
      CALL PGM(PGM1) PARM((X'0A') (X'000A') (X'0000000A') (X'000000000000000A'))
    2. passing value 1 to each 3I and 5I and 10I and 20I parameters in RPG
      CALL PGM(PGM1) PARM((X'01') (X'0001') (X'00000001') (X'0000000000000001'))
    3. passing value 18 to each 3I and 5I and 10I and 20I parameters in RPG
      CALL PGM(PGM1) PARM((X'12') (X'0012') (X'00000012') (X'0000000000000012'))

    You can check convert decimal to hex value here.

    Sample program
    This is the sample program that you can create at your end and test the above calls for passing Integer values in 3I, 5I, 10I, and 20I parameters in the RPG program:

         D main            PR                  EXTPGM('PGM1') 
         D                                3I 0                      
         D                                5I 0                      
         D                               10I 0                      
         D                               20I 0                      
         D main            PI                                       
         D num1                           3I 0                      
         D num2                           5I 0                      
         D num3                          10I 0                      
         D num4                          20I 0                      
          /Free                                                     
               dsply num1;                                          
               dsply num2;                                          
               dsply num3;                                          
               dsply num4;                                          
                                                                    
               *INLR  = *ON;                                        
          /End-Free       
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  22. Asked: October 6, 2024In: IBM i

    How to move JAR file to IBM i?

    Admin
    Admin
    Added an answer on October 6, 2024 at 6:32 am

    We can move the JAR file to the IBM i using the Integrated File System (IFS) on Access Client Solutions (ACS). Go to ACS. Open IFS. Navigate to the IFS directory where you want to upload/place the JAR from Windows PC. Right-click on the file listing area and click Upload. Select your JAR from the WiRead more

    We can move the JAR file to the IBM i using the Integrated File System (IFS) on Access Client Solutions (ACS).

    • Go to ACS.
    • Open IFS.
    • Navigate to the IFS directory where you want to upload/place the JAR from Windows PC.
    • Right-click on the file listing area and click Upload.
    • Select your JAR from the Windows PC and Click OK on the Upload dialog. This will start uploading the selected JAR to IBM i IFS.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  23. Asked: October 6, 2024In: Wordpress

    how can i update last modification date in yoast generated sitemap.xml on all post at once?

    Admin
    Admin
    Added an answer on October 6, 2024 at 6:27 am

    You can follow the below steps to update the last modification date for all posts, questions, and pages on your WordPress site sitemap.xml at once. Using SQL Query for bulk update: You can use SQL queries to update the post_modified and post_modified_gmt fields in the WordPress database. Please backRead more

    You can follow the below steps to update the last modification date for all posts, questions, and pages on your WordPress site sitemap.xml at once.

    Using SQL Query for bulk update:

    You can use SQL queries to update the post_modified and post_modified_gmt fields in the WordPress database.

    • Please back up your database before making any changes using SQL query.
    • Access your WordPress database from your hosting provider site using a tool like phpMyAdmin.
    • Run the following SQL query to update the modification date to the current date and time for all posts, pages, and questions on your site.
      UPDATE wp_posts
      SET post_modified = NOW(),
      post_modified_gmt = UTC_TIMESTAMP()
      WHERE post_type in ('post', 'page','question')
      AND post_status = 'publish';
      This SQL query updates the post_modified date, which Yoast uses to generate the tag in your sitemap.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  24. Asked: October 6, 2024In: Wordpress

    How to disbale Yoast schema output for Q&A website?

    Admin
    Admin
    Added an answer on October 6, 2024 at 6:09 am

    When you use the Yoast SEO plugin with a theme like Discy that has its own QA schema, there can be some conflicts occur in the schema: If both the Yoast SEO plugin and Discy theme are adding article and QA schema data respectively to the same question pages, it could lead to conflict and duplicationRead more

    When you use the Yoast SEO plugin with a theme like Discy that has its own QA schema, there can be some conflicts occur in the schema:

    If both the Yoast SEO plugin and Discy theme are adding article and QA schema data respectively to the same question pages, it could lead to conflict and duplication and make it even worse. Google might find it harder to find which schema data to prioritize whether Article or QA schema which can hurt your page’s ranking on SERP.
    You have to disable Yoast schema and retain Discy’s theme schema since the Discy theme has the native QA schema which is specifically designed for Q&A websites, and its schema should be optimal for those purposes.

    To disable Yoast schema, You can follow the below steps:

    • Add a new plugin Customization for WP SEO on the WordPress site. Install and Activate it.
    • Once activated, Goto Settings in the left menu panel in WordPress and select Customization for WP SEO.
    • There you will see the option Disable Schema Output. Check this option to disable all Yoast SEO’s schema output and click Save Changes.
    • You are all done and now Yoast schema output is disabled on your WordPress site. You can again validate any of your site’s existing page schema using the Schema Markup Validator tool.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  25. Asked: October 6, 2024In: IBM i

    how to get the number of records and file size for all the files in a given IBM i library?

    Admin
    Admin
    Added an answer on October 6, 2024 at 5:14 am

    You can execute the following SQL query to get the number of records and file size of each file/table in your library. select system_table_name, number_rows, data_size from qsys2.systablestat where system_table_schema = 'Libname' Here in this SQL query, we are selecting data from the IBM i catalog sRead more

    You can execute the following SQL query to get the number of records and file size of each file/table in your library.

    select system_table_name, number_rows, data_size from
    qsys2.systablestat where system_table_schema = 'Libname'

    Here in this SQL query, we are selecting data from the IBM i catalog systablestat present in the QSYS2 library.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  26. Asked: October 6, 2024In: IBM i

    How to copy Job log into a flat file?

    Admin
    Admin
    Added an answer on October 6, 2024 at 5:10 am

    You can follow these steps to copy the job log into a flat file: Create a PF named job log in the qtemp library using the CRTPF command crtpf file(qtemp/joblog) rcdlen (150) ccsid(65535) Print the Joblog using the DSPJOBLOG command dspjoblog job(job number/user profile/job name) output(*print) CopyRead more

    You can follow these steps to copy the job log into a flat file:

    • Create a PF named job log in the qtemp library using the CRTPF command
      crtpf file(qtemp/joblog) rcdlen (150) ccsid(65535)
    • Print the Joblog using the DSPJOBLOG command
      dspjoblog job(job number/user profile/job name) output(*print)
    • Copy the job log spool file QPJOBLOG to temp. file created in step 1.
      cpysplf file(qpjoblog) tofile(qtemp/joblog) splnbr(*last)

    Your flat file is ready with job log data of the provided job in DSPJOBLOG command and now you can save this flat file in a Save file and share it.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  27. Asked: October 6, 2024In: Java

    How to check the installed Java version on the IBM i machine?

    Admin
    Admin
    Added an answer on October 6, 2024 at 5:00 am

    You can execute the RUNJVA command on the IBM i which is used to run Java commands on the IBM i machine. When you run RUNJVA CLASS(*VERSION), it will display the installed Java version on your IBM i machine. The output of this command would look like: Java Shell Display java version "1.8.0_411" JavaRead more

    You can execute the RUNJVA command on the IBM i which is used to run Java commands on the IBM i machine.

    When you run RUNJVA CLASS(*VERSION), it will display the installed Java version on your IBM i machine.

    The output of this command would look like:

    Java Shell Display

    java version "1.8.0_411"
    Java(TM) SE Runtime Environment (build 8.0.8.25 - pap6480sr8fp25-20240328_01(SR8 FP25))
    IBM J9 VM (build 2.9, JRE 1.8.0 OS/400 ppc64-64-Bit Compressed References 20240305_66992 (JIT enabled, AOT enabled)
    OpenJ9 - e3126d7
    OMR - f2f50a8
    IBM - b81b1e2)
    JCL - 20240322_01 based on Oracle jdk8u411-b09
    Java program completed

    Here, as per the above output, the Java version is 1.8.0_411 which is a specific build of Java 1.8 (Java 8).

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  28. Asked: October 6, 2024In: IBM i

    how to check if the given source member is present in library src-pfs?

    Admin
    Admin
    Added an answer on October 6, 2024 at 4:53 am

    We can do this by running the QSHELL command ls on the IBM i green screen by invoking the Qshell environment using the STRQSH command. ls /qsys.lib/libname.lib/Q*SRC.FILE/srcmbrname.MBR ls command will list out files and directories. For example: I want to search for source member name file1 in allRead more

    We can do this by running the QSHELL command ls on the IBM i green screen by invoking the Qshell environment using the STRQSH command.

    ls /qsys.lib/libname.lib/Q*SRC.FILE/srcmbrname.MBR

    ls command will list out files and directories.

    For example: I want to search for source member name file1 in all of the source files available in the library TESTLIB, if it finds the source member the command will list out that member and if it does not find that source member then it gives error.

    Ran the following QSH command after running STRQSH on the command line,
    ls /qsys.lib/testlib.lib/Q*SRC.FILE/file1.MBR
    Source member found and its output is:
    /qsys.lib/testlib.lib/QDDSSRC.FILE/file1.MBR
    The source member FILE1 is present in the QDDSSRC source file in the library TESTLIB.

    Now, run the following QSH command after running STRQSH on the command line,
    ls /qsys.lib/testlib.lib/Q*SRC.FILE/filea.MBR
    Source member not found and its output is:
    ls: 001-2113 Error found getting information for object /qsys.lib/testlib.lib/Q*SRC.FILE/filea.MBR. No such path or directory.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  29. Asked: October 6, 2024In: IBM i

    Gettiing error character conversion between CCSID 65535 and CCSID 1208 not valid

    Admin
    Admin
    Added an answer on October 6, 2024 at 4:47 am

    You have to change your session job ccsid from 65535 to 37 only no need to change system level ccsid. This will fix your issue. Just execute chgjob ccsid(37) command in your logged-in IBM i session.

    You have to change your session job ccsid from 65535 to 37 only no need to change system level ccsid. This will fix your issue.

    Just execute chgjob ccsid(37) command in your logged-in IBM i session.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  30. Asked: October 6, 2024In: SQL

    How to find the library list of my IBM i session using SQL?

    Admin
    Admin
    Added an answer on October 6, 2024 at 4:44 am

    You can query an IBM DB2 catalog table LIBRARY_LIST_INFO available in the QSYS2 library on the IBM i system to get your session library list information using SQL. Just run this query and you will get your result: select listagg(sys_name,',') from qsys2.library_list_info Here, I am using the LISTAGGRead more

    You can query an IBM DB2 catalog table LIBRARY_LIST_INFO available in the QSYS2 library on the IBM i system to get your session library list information using SQL. Just run this query and you will get your result:

    select listagg(sys_name,',') from qsys2.library_list_info

    Here, I am using the LISTAGG aggregate function to concatenate values from multiple rows into a single string with a comma separator between the values.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  31. Asked: October 6, 2024In: SQL

    How to change STRSQL session to use library list?

    Admin
    Admin
    Added an answer on October 6, 2024 at 4:36 am

    Looking at both errors SQL0204 and SQL5016 it is clear that the *SQL Naming convention is set as default in your STRSQL session attributes. With the *SQL Naming convention being set on your STRSQL session you cannot use the qualifier slash(/) and instead, you have to only rely on using dot(.) as a qRead more

    Looking at both errors SQL0204 and SQL5016 it is clear that the *SQL Naming convention is set as default in your STRSQL session attributes.
    With the *SQL Naming convention being set on your STRSQL session you cannot use the qualifier slash(/) and instead, you have to only rely on using dot(.) as a qualifier. Also, with the *SQL naming convention it will search for the file/table in the schema name same as the user profile on the IBM i system.
    Therefore, both errors SQL0204 i.e. PF in DEVELOPER type *FILE not found, and SQL5016 i.e. Qualified object name PF1 not valid. are valid errors and they are more of a type of Diagnostic error.
    Therefore, to fix this problem use both slash(/) and dot(.) as a qualifier and run SQL queries without the need to qualify file/table with library name and instead search in the set library list in the same session you need to change the STRSQL session attribute namely Naming convention. So, please change the Naming convention attribute from *SQL to *SYS. You can do so by these steps:

    • On STRSQL session press F13 (shift + F1). It will show the following options:
      Interactive SQL Session Services
      
      Select one of the following: 
      
      1. Change session attributes 
      2. Print current session 
      3. Remove all entries from current session 
      4. Save session in source file 
      
      
      
      
      
      
      
      
      
      
      
      Selection 
           1
    • Take option 1 to change session attributes. It will show the following menu:
      Change Session Attributes 
      
      Type choices, press Enter. 
      
      Statement processing . . . . . *RUN *RUN, *VLD, *SYN 
      SELECT output . . . . . . . . 1 1=Display, 2=Printer 
      3=File 
      Commitment control . . . . . . *NONE *NONE, *CHG, *CS, *ALL, *RR 
      *NC, *UR, *RS 
      Date format . . . . . . . . . u *JOB, *USA, *ISO, *EUR, *JIS
      *MDY, *DMY, *YMD, *JUL 
      Date separator . . . . . . . . '/' *JOB, '/', '.', ',', '-' 
      ' ', *BLANK 
      Time format . . . . . . . . . *HMS *HMS, *USA, *ISO 
      *EUR, *JIS 
      Time separator . . . . . . . . ':' *JOB, ':', '.', ',' 
      ' ', *BLANK 
      Data refresh . . . . . . . . . *ALWAYS *ALWAYS, *FORWARD 
      Allow copy data . . . . . . . *YES *YES, *OPTIMIZE, *NO 
      Naming convention . . . . . . *SQL *SYS, *SQL 
    • Change the Naming convention from *SQL to *SYS.
    • Exit from the menu.
    • Exit from the STRSQL session.
    • Now add the library to the library list from the command line using the command ADDLIBLE LIB(DEVLIB). Go back to the STRSQL session and run SQL queries without qualifying the library name with file/table name or even using any qualifier either slash(/) or dot(.) if you are qualifying the file/table name.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  32. Asked: October 5, 2024In: SQL

    Can we provide spaces between colon and host variable in embedded SQL in IBM i?

    Admin
    Admin
    Added an answer on October 5, 2024 at 7:40 pm

    It works. You can provide space between the colon(:) and the host variable  used in embedded SQL in the RPG program. Refer to the below snippet code where we have space in between the colon(:) and host variable l_name. D l_name S 10A /Free clear l_name; exec sql select name into : l_name from clpf1Read more

    It works. You can provide space between the colon(:) and the host variable  used in embedded SQL in the RPG program.
    Refer to the below snippet code where we have space in between the colon(:) and host variable l_name.

         D l_name          S             10A       
          /Free                                    
            clear l_name;                          
            exec sql                               
            select name into : l_name              
            from clpf1 where rollno = 26;             
            *inlr  = *on;                          
          /End-Free             
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  33. Asked: October 5, 2024In: IBM i

    How to save JAR file to Save file?

    Admin
    Admin
    Added an answer on October 5, 2024 at 7:21 pm
    This answer was edited.

    You can save the JAR file stored at the IFS path to the save file using the command SAV. Please follow these steps to save the JAR file to save file. Create a save file in your devlib by running the CRTSAVF command from the command line on IBM i green screen. For Example, crtsavf file(testlib/savf1)Read more

    You can save the JAR file stored at the IFS path to the save file using the command SAV. Please follow these steps to save the JAR file to save file.

    • Create a save file in your devlib by running the CRTSAVF command from the command line on IBM i green screen. For Example, crtsavf file(testlib/savf1).
    • Locate the IFS path and JAR file name on IFS and note it down. Assuming your JAR file is located at /home/developer/files/jar1.jar.
    • Execute the SAV command from the command line to save the JAR file to save file.
      SAV DEV('/qsys.lib/testlib.lib/savf1.file')
      OBJ(('/home/developer/files/jar1.jar'))
    • This command will save the JAR file jar1.jar to the save file savf1. You can then view the save file contents using the command dspsavf testlib/savf10 there you will see the directory from where this JAR file is saved to this save file.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  34. Asked: October 5, 2024In: IBM i

    How to extract JAR file from save file?

    Admin
    Admin
    Added an answer on October 5, 2024 at 7:06 pm

    You can run the RST command from the command line to extract/restore the JAR file from the save file back to the IFS folder. To restore to the same directory location from where it was saved initially saved but on your IBM i IFS location. You can run this command. RST DEV('/qsys.lib/devlib.lib/ptfsaRead more

    You can run the RST command from the command line to extract/restore the JAR file from the save file back to the IFS folder.

    To restore to the same directory location from where it was saved initially saved but on your IBM i IFS location. You can run this command.

    RST DEV('/qsys.lib/devlib.lib/ptfsavf.file')
    OBJ(('/home/jvdev/ptf/2024/')) crtprndir(*yes)

    This will restore the jar file at the ifs path /home/jvdev/ptf/2024/.

    However, if you want it to extract/restore to a different IFS folder than it was saved then you can do that by running the following command.

    RST DEV('/qsys.lib/devlib.lib/ptfsavf.file')
    obj(('/home/jvdev/ptf/2024/' *include
    '/home/ckets/files/jarfiles/'))
    crtprndir(*yes)

    Here, the only difference is we have *INCLUDE to specify the new path name of the JAR file to restore on IFS. Provided the new path to restore ‘/home/ckets/files/jarfiles/‘.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  35. Asked: October 5, 2024In: IBM i

    How to enable the CTRL+C and CTRL+V key for copy and paste on IBM i green screen?

    Admin
    Admin
    Added an answer on October 5, 2024 at 6:55 pm

    You can map your keyboard on the IBM i ACS 5250 emulator to use CTRL + C and CTRL + V keys by following these steps: Open ACS 5250 emulator window. Click on Edit menu option on top and from Preferences select the Keyboard... option. Keyboard dialog box appears that opens the IBMi.kmp file from the eRead more

    You can map your keyboard on the IBM i ACS 5250 emulator to use CTRL + C and CTRL + V keys by following these steps:

    1. Open ACS 5250 emulator window.
    2. Click on Edit menu option on top and from Preferences select the Keyboard... option.
    3. Keyboard dialog box appears that opens the IBMi.kmp file from the emulator location on your Windows PC.
    4. On this dialog, you will see the Key Assignment tab. Be on it.
    5. Below that you will see a drop-down box for the option Category. Click on it and select Menu Commands from the drop-down box.
    6. Below Category, you will now notice the list of Menu commands and their Key value is being displayed.
    7. Scroll down the menu commands list and locate the Copy command and select it. The selected COPY menu command will get a blue highlight indicating its selection.
    8. Once the Copy command is selected from the menu commands list, Assign a key button below the list gets enabled. Click on it. This will show the message above that the message Press a key.
    9. Then I press and hold the CTRL key first and then press C and it enters the assignment value in the key column against the Copy command in the Menu command list. Please note that if you press the first key CTRL and release, it gets assigned as a value to the key column again Copy command right away without waiting for the second key.
    10. Repeat steps 7 through 9 for CTRL + V key setup for Paste menu command.
    11. Click on the Save button to save the keyboard mapping settings for CTRL + C and CTRL + V keys in IBMi.kmp file.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  36. Asked: October 5, 2024In: IBM i

    How to find which libraries were created by me on IBM i?

    Admin
    Admin
    Added an answer on October 5, 2024 at 6:44 pm
    This answer was edited.

    You can find the libraries created by you on the IBM i system by following these steps: Run the DSPOBJD command to list out all libraries for all users on the IBM i machine and create an outfile in the qtemp library. dspobjd obj(*allusr) objtype(*lib) output(*outfile) outfile(qtemp/libsfile) Now, yoRead more

    You can find the libraries created by you on the IBM i system by following these steps:

    • Run the DSPOBJD command to list out all libraries for all users on the IBM i machine and create an outfile in the qtemp library.
      dspobjd obj(*allusr) objtype(*lib) output(*outfile)
      outfile(qtemp/libsfile)
    • Now, you can query on the out file libsname created in the qtemp library and select the libraries for the specified user profile.
      select odobnm from qtemp.libsfile where odcrtu = 'USERPRF'
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  37. Asked: October 5, 2024In: GitHub

    How can I push to my fork from a clone of the original repository in GitHub?

    Admin
    Admin
    Added an answer on October 5, 2024 at 6:31 pm

    First, open the command prompt on your Windows machine. Navigate to your folder where you want to clone the forked repo assuming you have forked the original repo under your username. Suppose, you want to clone the fork repo to the desktop of your Windows PC then you execute cd desktop to navigate tRead more

    First, open the command prompt on your Windows machine. Navigate to your folder where you want to clone the forked repo assuming you have forked the original repo under your username. Suppose, you want to clone the fork repo to the desktop of your Windows PC then you execute cd desktop to navigate to the desktop.

    After that run the git clone fork-repo-url to clone the fork repo to the local Windows machine.

    git clone https://github.com/myusername/javacode.git

    this command will start cloning your fork repo on your desktop and will show the output like this on the command prompt.

    Cloning into 'javacode'...
    remote: Enumerating objects: 845, done.
    remote: Counting objects: 100% (461/461), done.
    remote: Compressing objects: 100% (157/157), done.
    remote: Total 845 (delta 325), reused 304 (delta 304), pack-reused 384 (from 1)
    Receiving objects: 100% (845/845), 8.24 MiB | 11.34 MiB/s, done.
    Resolving deltas: 100% (387/387), done.

    Once cloning is done, you can then run dir to see if the clone directory is created on the desktop. If created then run cd javacode to navigate to your cloned folder. Once you are in your cloned folder run the command dir again to see files cloned from the Github fork repo inside your desktop clone folder.

    After cloning, we need to set up a remote by running the following command on cmd.

    git remote -v

    This will list out the origin of the remote for this project which is from the fork.

    origin https://github.com/myusername/javacode.git (fetch)
    origin https://github.com/myusername/javacode.git (push)

    Now, set up a remote to the main remote repo which allows syncing of the fork repo with the main repo. for this, we need the URL of the original repo.

    You can get this main original repo URL by clicking on the link after your “repo forked from the link” and there under Code –> under HTTPS -> copy the original repo URL to the clipboard.

    Now under the command prompt window type the command to add remote to the main original repo.

    git remote add upstream https://github.com/Originalusername/javacode.git

    after this run this command again on the command prompt,

    git remote -v

    This will now list the fork repo as the origin and the original repo as upstream.

    origin https://github.com/myusername/javacode.git (fetch)
    origin https://github.com/myusername/javacode.git (push)
    upstream https://github.com/originalusername/javacode.git (fetch)
    upstream https://github.com/originalusername/javacode.git (push)

    Now try to open this cloned project on IntelliJ make changes commit and push to your fork repo it will be successful and you will be able to see your changes inside the GitHub forked repo. Now, if you want, you can request the original author to pull your changes using a pull request on GitHub.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  38. Asked: October 5, 2024In: SEO

    Error There are multiple H1 tags on the page reported in Bing Webmaster for my wordopress site

    Admin
    Admin
    Added an answer on October 5, 2024 at 6:12 pm

    I can see the recommended action suggested by Bing: Recommended action: Remove redundant h1 tags from the page source, so that only one h1 tag exists. These pages have more than one h1 tag. Multiple h1 header tags might confuse search engine bots and website users. It is recommended to use only oneRead more

    I can see the recommended action suggested by Bing:

    Recommended action:

    Remove redundant h1 tags from the page source, so that only one h1 tag exists.
    These pages have more than one h1 tag. Multiple h1 header tags might confuse search engine bots and website users. It is recommended to use only one h1 tag per page.

    But, rather I found one video on Youtube regarding the usage of double H1 tag on the website page.
    You can check this video More than one H1 tag on a page: good or bad?

     

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  39. Asked: October 5, 2024In: Wordpress

    Robots.txt file not getting updated in WordPress site using Advanced Crawl optimization setting in Yoast premium

    Admin
    Admin
    Added an answer on October 5, 2024 at 6:01 pm

    I have enabled Prevent crawling of internal site search URL settings for the Advanced Crawl optimization; however, I cannot see the added directives to my robots.txt file. Enabling the settings Prevent crawling of internal site search URLs Add a disallow rule to my robots.txt file to prevent the craRead more

    I have enabled Prevent crawling of internal site search URL settings for the Advanced Crawl optimization; however, I cannot see the added directives to my robots.txt file.

    Enabling the settings Prevent crawling of internal site search URLs
    Add a disallow rule to my robots.txt file to prevent the crawling of URLs like ?s=, /search/ and /page/*/?s=.”, this should add the following directives in the robots.txt file:

    Disallow: /?s=
    Disallow: /page/*/?s=
    Disallow: /search/

    However, I observed that the crawl directives would not be added to my default robots.txt file. Instead, it has already been added to the static robots.txt file here: https://example.com/?robots=1.

    the code added to static robots.txt which is the Yoast output.

    # START YOAST BLOCK
    # ---------------------------
    User-agent: *
    Disallow: /?s=
    Disallow: /page/*/?s=
    Disallow: /search/
    Disallow: /wp-json/
    Disallow: /?rest_route=
    
    Sitemap: https://example.com/sitemap_index.xml
    # ---------------------------
    # END YOAST BLOCK
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  40. Asked: October 5, 2024In: Wordpress

    Duplicate meta descriptions multiple tag errors reported by Bing Webmaster on my wordpress site

    Admin
    Admin
    Added an answer on October 5, 2024 at 5:50 pm

    I have disabled the meta-description output generated by Yoast as follows: Login to the WordPress site admin Accessed Yoast SEO -> Settings -> Content Types -> Questions and blanked out the text inside the meta description content box and Save Changes. You can follow this to change this onRead more

    I have disabled the meta-description output generated by Yoast as follows:

    • Login to the WordPress site admin
    • Accessed Yoast SEO -> Settings -> Content Types -> Questions and blanked out the text inside the meta description content box and Save Changes.
    • You can follow this to change this on other pages like Posts, Pages, Asked questions, categories, tags, etc whatever pages you have.
    • This will remove the meta description output generated by Yoast premium plugin and you will be left with only one meta description tag on your website pages. but in case your theme does not generate a meta description tag then please allow Yoast output to generate one meta description tag for your pages.
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  41. Asked: October 5, 2024In: Wordpress

    what is the difference between the two files ?robots=1 and robots.txt?

    Admin
    Admin
    Added an answer on October 5, 2024 at 5:41 pm

    robots.txt file is placed in the root directory of your WordPress site that provides instructions to the web crawler as to which part of the site is crawled or not. For example, you can always block certain directories, web pages, or other resources on your website from getting indexed by search engRead more

    robots.txt file is placed in the root directory of your WordPress site that provides instructions to the web crawler as to which part of the site is crawled or not.

    For example, you can always block certain directories, web pages, or other resources on your website from getting indexed by search engines like Google or Bing.

    You can see the contents of the robots.txt file by going to the page https://example.com/robots.txt.

    On the other hand, meta robots tag ?robots=1 is used at a page level to control whether individual pages should be indexed or followed.

    When you visit a page on your website with the ?robots=1 query parameter, then you can check the robots meta tags settings for that specific page.

    You can see how indexing instructions like index, noindex, follow, and nofollow are applied to your specific page.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  42. Asked: October 5, 2024In: SEO

    How Google interprets the default rules generated by Yoast plugin in the robots.txt file?

    Admin
    Admin
    Added an answer on October 5, 2024 at 5:30 pm

    This is the default output generated by the Yoast SEO plugin is installed on the WordPress site which is a standard rule for indexing a complete site. # START YOAST BLOCK # --------------------------- User-agent: * Disallow: Sitemap: https://example.com/sitemap_index.xml # --------------------------Read more

    This is the default output generated by the Yoast SEO plugin is installed on the WordPress site which is a standard rule for indexing a complete site.

    # START YOAST BLOCK
    # ---------------------------
    User-agent: *
    Disallow:
    
    Sitemap: https://example.com/sitemap_index.xml
    
    # ---------------------------
    # END YOAST BLOCK

    Lines 1, 2, and 8,9: Comments
    Line 3: User-agent: * The rules apply to all web crawlers, such as Googlebot, Bingbot, DuckDuckbot, Slurp, Yandexbot, Baiduspider, etc.
    Line 4: Disallow: As we can see, nothing is specified after the Disallow specification, meaning no pages are blocked from being crawled by the web crawler. They can crawl the complete site.
    Line 6: Sitemap: https://example.com/sitemap_index.xml This is the sitemap location of your WordPress site which search engine refers to index the web pages on your site.

    Here is the explanation of the meta robots tag ?robots=1 rules generated by the Yoast plugin for individual website pages.

    # START YOAST BLOCK
    # ---------------------------
    User-agent: *
    Disallow: /?s=
    Disallow: /page/*/?s=
    Disallow: /search/
    Disallow: /wp-json/
    Disallow: /?rest_route=
    
    Sitemap: https://example.com/sitemap_index.xml
    # ---------------------------
    # END YOAST BLOCK

    Lines 1, 2, and 11,12: Comments
    Line 3: User-agent: * means the rules apply to all web crawlers.
    Line 4: Disallow: /?s= This rule does not allow the web crawlers to crawl internal website search result pages starting with the/?s= query parameter.
    Line 5: Disallow: /page/*/?s= This rule does not allow the web crawlers to crawl paginated search result pages starting with /page/*/?s= query parameter.
    Line 6: Disallow: /search/ This rule does not allow the web crawlers to crawl alternative search result pages starting with /search/ query parameter.
    Line 7: Disallow: /wp-json/ This rule does not allow the web crawlers to crawl WordPress REST API at /wp-json/.
    Line 8: Disallow: /?rest_route= This rule does not allow the web crawlers to crawl the routes that are part of the REST API.
    Line 10: Sitemap: https://example.com/sitemap_index.xml This is the sitemap location of your WordPress site which search engine refers to index the web pages on your site.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
1 2 3

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

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.