FLUCUP-API FLUC Subprogram Interface

Functions
Functions

## Functions
const char * | flucvsn (void)
| Version. More...
const char * | flucabo (void)
| About. More...
const char * | fluclic (void)
| Get license text. More...
const char * | flucown (const char *own)
| Set/Get owner id. More...
const char * | flucpgm (const char *pgm)
| Set/Get program name. More...
int | flucenv (const int sys, const int std, const char *env)
| Load the FLAM environment. More...
int | flucinfo (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC INFO - Provides various information. More...
int | fluchash (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC HASH - Simplified Hash calculation. More...
int | flucconv (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC CONV - Simplified data conversion. More...
int | flucxcnv (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC XCNV - Extended data conversion. More...
int | flucxchk (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC XCHK - Extended data evalation. More...
int | flucgrep (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC GREP - Matching pattern in files like GREP. More...
int | flucicnv (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC ICNV - Character conversion like ICONV. More...
int | flucflam (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC FLAM - Support of FLAM4 command in FLUC. More...
int | flucutil (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC UTIL - Support of several utility function. More...
int | flucdiff (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC DIFF - Compares two data sources. More...
int | fluckey (const char *cmd, const char *pro, const char *out, const char *trc)
| FLUC KEY - Key management functions. More...
int | flucrsn (void)
| Get reason code. More...
const char * | flucmsg (const int rsn)
| Get a message for a reason code. More...
void | fluchlp (const int what, const int depth, const char *path, const char *out)
| Returns help information about the command string. More...
void | flucsyn (const int what, const int depth, const char *path, const char *out)
| Return syntax information about the command string. More...
void | flucdoc (const int what, const char *path, const char *out)
| Return documentation. More...
void | flucpro (const int what, const char *ipro, const char *prop, const char *opro, const char *out)
| Manage properties. More...

## Detailed Description

## Function Documentation

## ◆ flucvsn()

const char * flucvsn | ( | void |  | ) |

Version.

This function returns a string with version information for each used component. This should be used in a support case.

Returns
  a pointer to a static area containing the zero-terminated version string

## ◆ flucabo()

const char * flucabo | ( | void |  | ) |

About.

This function returns a string with about information for this library on multiple lines and license information for used external libraries.

Returns
  a pointer to a static area containing the zero-terminated about string

## ◆ fluclic()

const char * fluclic | ( | void |  | ) |

Get license text.

This function can be used to get the current license text on multiple lines. The license text defines the permissible use of this library.

Returns
  a pointer to a static area with a zero-terminated string containing the current license text.

## ◆ flucown()

const char * flucown | ( | const char * | own | ) |

Set/Get owner id.

This function can be used to get (pcOwn==NULL) or to set the current owner id. The owner id is a logical qualifier to separate different configurations for different clients in the same property file. If you want use a configuration for another owner as "limes", then you must define the owner id with this function first.

Parameters

  [in] | own | Define owner name (DEFAULT: "limes")

Returns
  a pointer to a static area with a zero-terminated string containing the current owner id.

## ◆ flucpgm()

const char * flucpgm | ( | const char * | pgm | ) |

Set/Get program name.

This function can be used to get (pcPgm==NULL) or to set ("mypg") the current program name. If you implement an own property management or a program which does not conform to the FLCL infrastructure components, it might be useful to change the program name.

Parameters

  [in] | pgm | Define program name (DEFAULT: "flcl")

Returns
  a pointer to a static area with a zero-terminated string containing the current program name.

## ◆ flucenv()

int flucenv | ( | const int | sys,
|  | const int | std,
|  | const char * | env
| ) |  |

Load the FLAM environment.

This function load the FLAM system variables (only on z/OS or in EDZ environment), the STDENV definitions ('DD:STDENV' or '<SYSUID>.STDENV' on z/OS or '.stdenv' file in working or home directory on other system) and a optional list if variables to the environment. You can adjust the environment before the first call to a FLAM API function is done. This function gives the possibility to work with the same environment used by FLAM utilities, subsystems, etc.

Parameters

  [in] | sys | True to load system variables, false no system variables active
  [in] | std | True to load standard environment, false no standard environment variables active
  [in] | env | Optional list (could be NULL or empty) of environment variables (KEYWORD=VALUE) separated by new line ('\n') or semicolon (';')

Returns
  negative (<0) error else (>=0) amount of environment variable load

## ◆ flucinfo()

int flucinfo | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC INFO - Provides various information.

This function calls the INFO command of FLUC

Examples: e=flucinfo("get.file='test.gz'",NULL,NULL,NULL);

Parameters

  [in] | cmd | Command string with GET and LOG instructions (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with GET and LOG instructions (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then stderr is used)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ fluchash()

int fluchash | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC HASH - Simplified Hash calculation.

This function calls the HASH command of FLUC

Examples: e=fluchash("file='test.gz' algo=md5",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with FILE and LOG instructions (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with FILE and LOG instructions (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucconv()

int flucconv | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC CONV - Simplified data conversion.

This function calls the CONV command of FLUC

Examples: e=flucconv("read.text(file='test.txt') write.record()",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with READ, WRITE and LOG instructions (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with READ, WRITE and LOG instructions (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucxcnv()

int flucxcnv | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC XCNV - Extended data conversion.

This function calls the XCNV command of FLUC

Examples: e=flucxcnv("inp(sav.fil(fio.blk(name='test.txt') cnv.chr(from='IBM-1141' to='UTF-8') fmt.txt())) out(sav.fil(fio.blk(name='test.out')))",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with INP, OUT and LOG instructions (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with INP, OUT and LOG instructions (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucxchk()

int flucxchk | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC XCHK - Extended data evalation.

This function calls the XCHK command of FLUC

Examples: e=flucxchk("inp(sav.fil(fio.blk(name='test.txt') cnv.hsh() ))",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with INP and LOG instructions (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with INP and LOG instructions (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucgrep()

int flucgrep | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC GREP - Matching pattern in files like GREP.

This function calls the GREP command of FLUC

Examples: e=flucgrep("input='wrt*.txt' pattern='^Abfall'",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with GREP parameter (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with GREP parameter (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucicnv()

int flucicnv | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC ICNV - Character conversion like ICONV.

This function calls the ICNV command of FLUC

Examples: e=flucicnv("in='test.txt' from='IBM-1141' to='UTF-8' ENL2LF out='test.out'",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with ICONV parameter (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with ICONV parameter (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucflam()

int flucflam | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC FLAM - Support of FLAM4 command in FLUC.

This function calls the FLAM command of FLUC

Examples: e=flucflam("comp flamin='test.txt' flamfile='test.fla' inrecformat=undefined",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with FLAM parameter (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with FLAM parameter (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucutil()

int flucutil | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC UTIL - Support of several utility function.

This function calls the UTIL command of FLUC

Examples: e=flucutil("run.remove='~.test.**'",NULL,NULL,NULL);

Parameters

  [in] | cmd | Command string with UTIL parameter (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with UTIL parameter (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucdiff()

int flucdiff | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC DIFF - Compares two data sources.

This function calls the DIFF command of FLUC

Examples: e=flucdiff("read.file'./test.txt.gz' compare.file='~.test.fba'",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with DIFF parameter (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with DIFF parameter (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ fluckey()

int fluckey | ( | const char * | cmd,
|  | const char * | pro,
|  | const char * | out,
|  | const char * | trc
| ) |  |

FLUC KEY - Key management functions.

This function calls the KEY command of FLUC

Examples: e=fluckey("import.pgp(file='keyFile.gpg')",NULL,":STDERR",NULL);

Parameters

  [in] | cmd | Command string with KEY parameter (if starts with '=', a parameter file containing the command string must follow)
  [in] | pro | Property string with KEY parameter (can be empty or NULL)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)
  [in] | trc | Filename for tracing (if NULL or empty then no trace is written)

Returns
  signed integer with condition code for the command

## ◆ flucrsn()

int flucrsn | ( | void |  | ) |

Get reason code.

This function return the reason code (internal FLAM error code) if a call to a FLUC command fails.

Returns
  signed integer with internal FLAM reason code

## ◆ flucmsg()

const char * flucmsg | ( | const int | rsn | ) |

Get a message for a reason code.

Parameters

  [in] | rsn | Signed integer containing the reason code

Returns
  a pointer to a static area with a zero-terminated string containing the error message for that reason code.

## ◆ fluchlp()

void fluchlp | ( | const int | what,
|  | const int | depth,
|  | const char * | path,
|  | const char * | out
| ) |  |

Returns help information about the command string.

This function can be used to get all help messages or man pages for each parameter in the command string. If depth 0 or greater then 9 aliases are provided. In all other cases aliases are suppressed. Please use flucsyn() to see possible aliases for the same argument.

Parameters

  [in] | what | Integer constant for the corresponding command string (FLUC_CONV or FLUC_XCNV or ...)
  [in] | depth | Number of levels to display (0-Man page, 1-One Level, 2-Two Level, ..., <9-All)
  [in] | path | Path (e.g. conv.read.text.ccsid) to limit help to the (sub)tree of a certain object
  [in] | out | Filename for printouts (if NULL or empty then stderr is used)

## ◆ flucsyn()

void flucsyn | ( | const int | what,
|  | const int | depth,
|  | const char * | path,
|  | const char * | out
| ) |  |

Return syntax information about the command string.

This function can be used to determine the complete syntax of the command strings.

Parameters

  [in] | what | Integer constant for the corresponding command string (FLUC_CONV or FLUC_XCNV or ...)
  [in] | depth | Number of levels to display (0-Man page, 1-One Level, 2-Two Level, ..., <9-All)
  [in] | path | Path (e.g. conv.read.text.ccsid) to limit syntax to the (sub)tree of a certain object
  [in] | out | Filename for printouts (if NULL or empty then stderr is used)

## ◆ flucdoc()

void flucdoc | ( | const int | what,
|  | const char * | path,
|  | const char * | out
| ) |  |

Return documentation.

This function can be used to determine the complete documentation of the corresponding command.

Parameters

  [in] | what | Integer constant for the corresponding command string (FLUC_CONV or FLUC_XCNV or ...)
  [in] | path | Path (e.g. conv.read.text.ccsid) to limit docu to the (sub)tree of a certain object
  [in] | out | Filename for printouts (if NULL or empty then stderr is used)

## ◆ flucpro()

void flucpro | ( | const int | what,
|  | const char * | ipro,
|  | const char * | prop,
|  | const char * | opro,
|  | const char * | out
| ) |  |

Manage properties.

This function can be used to manage a property file for one of the supported commands. You can generate a property file if 'ipro' NULL and 'opro' defined. You can printout the properties if 'ipro' defined and 'opro' is NULL. You can validate and copy property files if 'ipro' and 'opro' defined. You can adjust a property file if 'ipro' defined, 'prop' are used and 'opro' set.

Parameters

  [in] | what | Integer constant for the corresponding command (FLUC_CONV or FLUC_XCNV or ...)
  [in] | ipro | Property file to read (if NULL or empty then then no property file is read)
  [in] | prop | Property string to manipulate the current properties (if NULL or empty then no update is done)
  [in] | opro | Property file to write (if NULL or empty then stdout is used)
  [in] | out | Filename for printouts (if NULL or empty then is no printout produced)