This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Retrieve the system name by call to MI | |
| -- This also showcase how to integrate the C code directly into your UDTF | |
| -- | |
| -- Simply paste this gist into ACS SQL and step through the example. | |
| -- | |
| -- It is a cool example how far you can go with SQL: Have fun 😀 | |
| -- (C) Niels Liisberg 2022 | |
| -- | |
| -- This gist is distributed on an "as is" basis, without warranties | |
| -- or conditions of any kind, either express or implied. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Enable netserver user | |
| -- This also showcase how to integrate the C code directly into your UDTF | |
| -- | |
| -- Simply paste this gist into ACS SQL and step through the example. | |
| -- | |
| -- It is a cool example how far you can go with SQL: Have fun 😀 | |
| -- (C) Niels Liisberg 2022 | |
| -- | |
| -- This gist is distributed on an "as is" basis, without warranties | |
| -- or conditions of any kind, either express or implied. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- convert BLOB to a bsae64 CLOB in UTF-8 | |
| -- This also showcase how to integrate the C code directly into your UDTF | |
| -- | |
| -- Simply paste this gist into ACS SQL and step through the example. | |
| -- | |
| -- It is a cool example how far you can go with SQL: Have fun 😀 | |
| -- (C) Niels Liisberg 2022 | |
| -- | |
| -- This gist is distributed on an "as is" basis, without warranties | |
| -- or conditions of any kind, either express or implied. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- List service program procedure exports | |
| -- | |
| -- Simply paste this gist into ACS SQL and step through the example. | |
| -- | |
| -- It is a cool example how far you can go with SQL: Have fun 😀 | |
| -- (C) Niels Liisberg 2022 | |
| -- | |
| -- This gist is distributed on an "as is" basis, without warranties | |
| -- or conditions of any kind, either expressed or implied. | |
| ---------------------------------------------------------------------------------------------- | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Returns a list of all dates in a given year | |
| -- | |
| -- Note: I am using library QUSRSYS. I suggest you put it into your own tool library | |
| -- | |
| -- Simply paste this gist into ACS SQL and step through the example. | |
| -- | |
| -- It is a cool example how far you can go with SQL: Have fun 😀 | |
| -- (C) Niels Liisberg 2022 | |
| -- | |
| -- This gist is distributed on an "as is" basis, without warranties | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Returns a list numbers: | |
| -- from and including FROM value | |
| -- until and including TO value | |
| -- and optional STEP can be either positive or negative. Default to +1 for step up and -1 for step down | |
| -- | |
| -- Note: I am using library QUSRSYS. I suggest you put it into your own tool library | |
| -- | |
| -- Simply paste this gist into ACS SQL and step through the example. | |
| -- | |
| -- It is a cool example how far you can go with SQL: Have fun 😀 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Convert text to decimal number for europeans where decimal point is a comma | |
| -- | |
| -- This also showcase how to integrate the C code directly into your UDTF | |
| -- | |
| -- Simply paste this gist into ACS SQL and step through the example. | |
| -- | |
| -- Note: I am using the library QUSRSYS. I suggest you put it into your own tool library | |
| -- | |
| -- It is a cool example how far you can go with SQL: Have fun 😀 | |
| -- (C) Niels Liisberg 2022 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Returns database relations with keys | |
| -- for SQL tables, the name is convert to the physical filename first. | |
| -- Simply paste this gist into ACS SQL and run it to create the UDTF. | |
| -- Note: I am using library QUSRSYS. I suggest you put it into your own tool library | |
| -- It is a cool example how far you can go with SQL: Have fun - | |
| -- (C) Niels Liisberg 2023 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- UDTF to return a capitalize first letter in each word of a string | |
| -- Simply paste this gist into ACS SQL and run it to create the UDTF. | |
| -- Note: I am using library QUSRSYS. I suggest you put it into your own tool library | |
| -- It is a cool example how far you can go with SQL: Have fun - | |
| -- (C) Niels Liisberg 2023 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- SQL Scalar function to delete ( unlink) a IFS files | |
| -- this is a wrapper for unlink (delete IFS files) system / unix API | |
| -- Simply paste this gist into ACS SQL and run it to create the UDTF. | |
| -- Note: I am using library QUSRSYS. I suggest you put it into your own tool library | |
| -- It is a cool example how far you can go with SQL: Have fun - | |
| -- (C) Niels Liisberg 2023 |