FLUC Subprogram

The FLUC subprogram uses the element interface for original data in order to convert over and back between their different representations on different platforms and in different countries. For that purpose there are several methods for reading original data, convert and save them, adapting them in turn to different platforms (records vs. delimiters) and to regional differencies (character sets) so they remain legible. FLUC-UP is a platform-independent load module which is linked with applications like, for example, the FLUC-Utility FLCL CONV. It is, therefore, a subprogram providing the full functionality of FLUC in one function.

 

Benefits

  • Supports all functions and interfaces of the FLUC utility for processing files, data streams, and other data sources
  • Executes all write and read accesses to original files under its own control
  • Optional generation of a detailed processing and error log
  • Can be linked to applications written in any programming language including JAVA (JNI)
  • Available both as statically bound object code and as a dynamic library
 

 

The product

  • Modular architecture be means of which for both reading and writing a respective I/O method, up to 32 conversions, and a formatting method can be selected and provided with specific parameters
  • The load module are controled over one string parameter known from the command line interface
  • Detailed statistical figures, an error trace, and various logs are produced (e.g. with character conversion)
  • Beside return codes, a processing log can be provided as feedback showing processing results
  • Available as 31/32-bit-code or as 64-bit-code
  • Since the entire FLUC consists of just one function that accepts 3 parameter strings (command line, filename for output (optional), file name for trace (optional)) integration into an application is very simple
 

Example

The mainframe COBOL example below reads a file (DD:INPUT) record-by-record and writes it in CP1252 and with 0x0D0A as delimiter to a GZIP file for Windows (DD:OUTPUT). The example program uses DD names INPUT and OUTPUT and contains the corresponding conversion parameters in hardcoded form. The result is a simple batch utility to convert each kind of text file on z/OS (FB/VB/VSAM) to an GZIP file for Windows. (Padding characters of FB files are suppressed (SUPPAD))

       IDENTIFICATION DIVISION.
       PROGRAM-ID.  SOFCUCNV.
       AUTHOR.      LIMES DATENTECHNIK GMBH.
      *
      * SOFCUCNV CALLS THE FLAM-PROGRAM FCUCONV
      *       TO READ A DATA SET AND CONVERT IT TO A WINDOWS GZIP FILE.
      *
      *       FCUCONV SUPPRESSES TRAILING PADDING CHARACTERS (SUPPAD)
      *       AND CONVERTS CHARACTER FROM IBM1141 TO CP1252;
      *       TO EVERY RECORD THE RECORD DELIMITER X'0D0A' IS ADDED,
      *       ALL DATA WILL BE COMPRESSED BY THE GZIP-LIBRARY.
      *
      *       THIS FILE MAY BE TRANSFERRED BINARY TO ANY WINDOWS SYSTEM,
      *       ALL DATA ARE WINDOWS-LIKE.
      *
      * DD-NAMES USED IN THIS EXAMPLE:
      *
      *   INPUT      INPUT FILE
      *   OUTPUT     OUTPUT FILE
      *   LOGOUT     LOGFILE
      *
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       INPUT-OUTPUT SECTION.
      *
       DATA DIVISION.
      *
       WORKING-STORAGE SECTION.
      *
       01  FCUCONV-PARAMETER.
      *
      * RETURNCODE
      *
           02  F-RETCO     PIC S9(8)  COMP VALUE ZERO.
              88 FLAMOK    VALUE  0.
      *
      * LENGTH OF FOLLWING COMMAND
      *
           02  F-CMDLEN    PIC S9(8)  COMP VALUE 200.
      *
      * COMMAND
      *
           02  F-COMMAND   PIC X(200) VALUE
           'READ.RECORD(FILE=''DD:INPUT'' CCSID=''1141'' SUPPAD)
      -    'WRITE.TEXT(FILE=''DD:OUTPUT''
      -    ' METHOD=WINDOWS CCSID=''1252'' COMP.GZIP())'.
      *
      * LENGTH OF PROPERTY STRING (0=NONE)
      *
           02  F-PROLEN    PIC S9(8)  COMP VALUE 0.
      *
      * PROPERTIES
      *
           02  F-PROPERTY  PIC X(200) VALUE ''.
      *
      * PRINT OUT IN FILE WITH DD-NAME LOGOUT
      *
           02  F-LOGLEN    PIC S9(8)  COMP VALUE 9.
           02  F-LOGFILE   PIC X(9)   VALUE 'DD:LOGOUT'.
      *
      * NO TRACE FILE
      *
           02  F-TRCLEN    PIC S9(8)  COMP VALUE ZERO.
           02  F-TRCFILE   PIC X(44).
      /
       PROCEDURE DIVISION.
       MAIN SECTION.
      *
       CALL-FLAM-ROUTINE.
      *
      *  CALL FCUCONV
      *
           CALL 'FCUCONV' USING F-RETCO,
                                F-CMDLEN,
                                F-COMMAND,
                                F-PROLEN,
                                F-PROPERTY,
                                F-LOGLEN,
                                F-LOGFILE,
                                F-TRCLEN,
                                F-TRCFILE.

       SET-RETURN-CODE.
           MOVE F-RETCO   TO RETURN-CODE.
       MAIN-END.
           STOP RUN.

Due to autodetection, the next COBOL example reads normal record-oriented files (PS(FB/VB), PDS/E(FB/VB), VSAM, ...), binary files, record- or text-oriented USS files, binary transfered text and XML files from other platforms, binary transfered GZIP, BZIP2 or XZ files containing binary, text or XML data, FLAMFILEs (undefined, stream or record oriented) and other format independent of the charset and writes the determined records to an output dataset in IBM1141.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.  SOFLVIEW.
       AUTHOR.      LIMES DATENTECHNIK GMBH.
      *
      * SOFLVIEW CALLS THE FLAM-PROGRAM FCUCONV
      *       TO READ ANY DATA SET AND TO WRITE RECORDS IN A DATA SET
      *       WITH DD-NAME OUTPUT, LONGER RECORDS WILL BE TRUNCATED
      *       (RECM=CUT),ALL DATA WILL BE TRANSLITERATED (SYSTAB=ICONV),
      *       AND, IF NECESSARY, SUBSTITUTED (CHRM=SUB) TO CCSID 1141.
      *       LOGGING IS IN SHORT FORM WITHOUT TIMESTAMP (FORMAT=DIALOG)
      *       AND IDENT=FLVIEW.
      *
      * DD-NAMES USED IN THIS EXAMPLE:
      *
      *   INPUT      INPUT FILE
      *   OUTPUT     OUTPUT FILE
      *   LOGOUT     LOG FILE
      *
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       INPUT-OUTPUT SECTION.
      *
       DATA DIVISION.
      *
       WORKING-STORAGE SECTION.
      *
       01  FCUCONV-PARAMETER.
      *
      * RETURNCODE
      *
           02  F-RETCO     PIC S9(8)  COMP VALUE ZERO.
              88 FLAMOK    VALUE  0.
      *
      * LENGTH OF FOLLWING COMMAND
      *
           02  F-CMDLEN    PIC S9(8)  COMP VALUE 240.
      *
      * COMMAND
      *
           02  F-COMMAND.
             05 FILLER PIC X(120) VALUE
           "READ.FILE=DD:INPUT WRITE.RECORD(FILE=DD:OUTPUT,RECM=CUT,"
      -    "CHRM=SUB,SYST=ICONV,CCSID=1141)".
             05 FILLER PIC X(120) VALUE
           "LOGGING.STREAM(FORMAT=DIALOG,IDENT=FLVIEW)".
      *
      * LENGTH OF PROPERTY STRING (0=NONE)
      *
           02  F-PROLEN    PIC S9(8)  COMP VALUE 0.
      *
      * PROPERTIES
      *
           02  F-PROPERTY  PIC X(200) VALUE " ".
      *
      * PRINT OUT IN FILE WITH DD-NAME LOGOUT
      *
           02  F-LOGLEN    PIC S9(8)  COMP VALUE 9.
           02  F-LOGFILE   PIC X(9)   VALUE "DD:LOGOUT".
      *
      * NO TRACE FILE
      *
           02  F-TRCLEN    PIC S9(8)  COMP VALUE ZERO.
           02  F-TRCFILE   PIC X(44).
      /
       PROCEDURE DIVISION.
       MAIN SECTION.
      *
       CALL-FLAM-ROUTINE.
      *
      *  CALL FCUCONV
      *
           CALL "FCUCONV" USING F-RETCO,
                                F-CMDLEN,
                                F-COMMAND,
                                F-PROLEN,
                                F-PROPERTY,
                                F-LOGLEN,
                                F-LOGFILE,
                                F-TRCLEN,
                                F-TRCFILE.

       SET-RETURN-CODE.
           MOVE F-RETCO   TO RETURN-CODE.
       MAIN-END.
           STOP RUN.

And the last example is the JCL job to start the sample program (part of the software package) above.

//SOFLVIEW  JOB 1,'LIMES-DATENTECHNIK',
//*         TYPRUN=SCAN,
//          class="B",MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*---------------------------------------------------------
//*
//*   SAMPLE PROGRAM SOFLVIEW
//*         "ANYVIEWER"
//*  READS ANY FILE, CONVERTS DATA
//*  TO OWN CCSID AND WRITES RECORDS
//*  TO OUTPUT FILE.
//*
//*DD-NAMES USED IN THIS EXAMPLE:
//*
//* INPUT  THE FILE TO READ
//* OUTPUT OUR OUTPUT DATA SET
//*---------------------------------------------------------
//FLVIEW EXEC PGM=SOFLVIEW
//STEPLIB  DD DSN=&SYSUID..FLAM.LOAD,DISP=SHR
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INPUT    DD DSN=&SYSUID..FLAM.JOBLIB($ABOUT),DISP=SHR
//OUTPUT   DD SYSOUT=*
//LOGOUT   DD SYSOUT=*
//*

This sample program works like our CLIST "FLVIEW" which is available as ISPF line command to browse each kind of file in ISPF 3.4.

For additional information please refer to the interface specification in the Download area.