FLUC Utility

The FLUC utility allows to exploit the capabilities of the FLUC subprogram as a batch program by an easy-to-use command line or in the respective script languages/shells (BAT, BASH, PERL, JCL, …) of the various platforms. It represents the respective platform-dependent implementation of FLUC for processing complete files, streams, tables, or other data sources in the form of a command parser needed for automating processes. This tool is used primarily for converting data sets without needing a temporary FLAMFILE. FLUC is available as of version 5 and is called by CONV, XCNV, DIFF and INFO command of the FLCL (Frankenstein-Limes Command Line).

 

Benefits

  • Cross-platform and cross-border converting of file and data formats (internationalization) with local or remote access
  • Supports various I/O methods, codecs, encryption schemes, compression algorithms, character set translation and conversions between logical data formats
  • Automatic recognition of compression algorithm (GZIP, BZIP2, XZ, ...) when reading text data. That allows transparent handling of compressed and uncompressed texts
  • Data exchange between mainframes (System/z (VSE, z/OS), BS2000 (OSD), …) and the distributed world (WINDOWS, UNIX, …) is simplified or even made possible
  • Simple and fast integration of complex batch processes for maximum automation
 

 

The product

  • Easy-to-use and highly intelligent command line with interactive help, configuration and property management including multi client cabebilities
  • Byte, block, record, and text-oriented I/O
  • Reads and writes FLAM4 files, ZIP archives and TARballs
  • Supports
    • Multiple write specifications
    • SSH for remote access
    • HEX (BASE16), BASE32/64, and other encodings
    • OpenPGP, z/OS-EF, and other encryptions
    • GZIP, LZMA, BZIP2, LZIP, XZ and other compression
    • ZIP, TAR, FLAM4 and other archive formats
    • Character set conversions between ASCII, EBCDIC, and UNICODE incl. casemapping, substitution, transliteration with a professional reporting and user defined subsets (string.latin), NFC/NFD normalization, entry assistant for codepoints in single byte character sets (UNICODE support for 3270)
    • Checksum claculation and verification (MD5, SHA1, SHA256, SHA512)
    • Signature generation and verification (e.g. OpenPGP detached signatures)
    • Binary, text, table, XML, and other formattings
  • Uses native file organizations and record formats on every platform
  • Available for a wide range of platforms: AIX, HP-UX, Oracle Solaris, Linux, z/OS, Windows, VSE, BS2000, ….
 

FLINFO and FLVIEW

As part of FLUC, we offer two commands on all plattforms (e.g. on z/OS as ISPF line commands):

FLINFO (equivalent to flcl info get.file=&DSN) displays all file attributes (file format, file size, organization, record format, record length, ...) of a file. This also includes member lists of concatenated FLAM, GZIP, BZIP2 or XZ files. In addition to the file format and detected character set, detected delimiters, padding characters and base encodings are also displayed.

flinfo_small.png

FLVIEW uses the CONV command of FLUC (flcl conv read.file=&DSN write.record()) to read any file in an automated way (XML, Text, Binary) and display it in clear form, so that you can view the actual content in a well-formatted way. Here is an example of a CLIST for z/OS:

PROC 1 DSN
/*Echo off                                                      */
CONTROL NOFLUSH NOMSG /* SYMLIST LIST CONLIST */
/*Determin envars                                               */
ISPEXEC VGET (FLLOAD ZUSER)
/*Suffix for temp files                                         */
SET &SUF = &SUBSTR(4:5,&SYSTIME)&SUBSTR(7:8,&SYSTIME)
/*Temp command DD name                                          */
SET &CDD = CTMP&SUF
/*Temp command DSN                                              */
SET &CMD = &ZUSER..FLCMD.TMP&SUF
/*Temp output file name                                         */
SET &OUT = &ZUSER..FLOUT.TMP&SUF
/*Determine FLAM LOAD and CALL of FLCL                          */
IF &STR(&FLLOAD) = &Z OR &STR(&FLLOAD) = &STR(*) THEN +
    SET &FLCALL = &STR(CALL *(FLCL) )
ELSE SET &FLCALL = &STR(CALL '&FLLOAD(FLCL)' )
/*Delete command file                                           */
DEL '&CMD'
/*Allocate command dataset                                      */
ALLOC DSN('&CMD') DD(&CDD) NEW REUSE +
DSORG(PS) LRECL(256) BLKSIZE(0) RECFM(V,B) SPACE(1,1) TRACKS
/*Open command file, an write parameter string                  */
OPENFILE &CDD OUTPUT
/*Write conv command to command file                            */
SET &ODCP = &STR(FALLOC(ORGA=SEQ,RECF=VB,RECL=32760))
SET &MODE = &STR(RECM=CUT,CHRM=SUB,SYSTAB=ICONV)
SET &READ = &STR(READ.AUTO(FILE=&DSN))
SET &&CDD = &STR(&READ)
PUTFILE &CDD
SET &WRIT = &STR(WRITE.RECORD(FILE='&OUT' &ODCP &MODE))
SET &&CDD = &STR(&WRIT)
PUTFILE &CDD
SET &MESG = &STR(MESSAGE(ERROR,ERRTRACE))
SET &&CDD = &STR(&MESG)
PUTFILE &CDD
SET &LOGI = &STR(LOGGING.STREAM(FORMAT=DIALOG,IDENT='FLVIEW'))
SET &&CDD = &STR(&LOGI)
PUTFILE &CDD
SET &FLMPAR = &STR(&READ &WRIT &MESG &LOGI)
/*Close parameter file                                          */
CLOSFILE &CDD
/*Set flcl parameter of conv command to parameter file          */
SET &FLMCMD = &STR(CONV)
SET &FLMPRM = &STR(&FLMCMD=DD:&CDD)
/*Call flcl with parameter file                                 */
&STR(&FLCALL) '&FLMPRM'
/*Get last errorcode                                            */
SET &FLMERR = &LASTCC
/*Only if success browse out-file                               */
ISPEXEC CONTROL ERRORS RETURN
IF &FLMERR = 0 THEN DO
   ISPEXEC BROWSE DATASET('&OUT')
   SET &BER = &LASTCC
   IF &BER = 12 THEN DO
      SET &FLMERR = &BER
      ISPEXEC SETMSG MSG(ISPG120)
   END
   ELSE IF &BER > 0 THEN DO
      SET &FLMERR = &BER
      ISPEXEC SETMSG MSG(ISRB011)
   END
END
ELSE DO
   ISPEXEC SETMSG MSG(FLM050)
END
ISPEXEC CONTROL ERRORS CANCEL
/*Free allocation and delete temp datasets                      */
FREE DD(&CDD)
DEL '&OUT'
DEL '&CMD'
EXIT CODE(&FLMERR)

When using e.g. FLVIEW on a file in ISPF 3.4, the clear content of the file is displayed in the browser. This applies to normal record-oriented datasets, VSAM files or file on USS (file manager). Beside regular files, all kinds of files tranferred to the host as binary from Windows/Linux/... are read correctly and converted into records. This includes text and XML files (pretty printed) as well as GZIP, BZIP2 and XZ files. Furthermore, all FLAMFILEs (undefined, stream, text or record) are displayed correctly. Even if the FLAM member is a GZIP file, the contents (XML, text, binary) of the  GZIP file is displayed correctly. On UNIX and WINDOWS systems, files are not converted into records, but into text or a  binary dump.