TRANSFORM (HEADER, TRAILER, and PREFIX)


Use with HEADER, TRAILER, and PREFIX to change the format of the data when it is added to the output file. The changes to the format include the:

  • Length
  • Type of data

GUID-0BFE0D92-69CF-4320-A0D1-49B3FD362F59-low.png

Required or Optional

Optional

Synonym

None

Values

For detailed information about using TRANSFORM, see Transformed-output

Default Value

None

Example

  • Extracts from a database with the name &dbdname
  • Selects all the segments and places the output in a file with the name &outdd
  • Creates a format that contains a user-defined header and prefix
  • Creates a field in the prefix with the segment name specified in &segname
  • Creates four fields in the header that contains the values specified using &value
  • Creates two fields in the header that contain the values specified using &value transformed into the format specified by s:lt.
 EXTRACT( DBDNAME ( &dbdname )
    OUTPUTFILE( DDNAME ( &outdd )
        SELECT SEGMENT ( * )
    FORMAT( UNDEFINED(                                 
        PREFIX ( FIELD ( ( &segname ) ) )              
            HEADER (
            FIELD ( ( &value ) )
            FIELD ( ( &value ) )
            FIELD ( ( &value ) )
            FIELD( ( &value ) TRANSFORM (s:lt) )
            FIELD( ( &value ) )
            FIELD( ( &value ) TRANSFORM (s:lt) )
            )
            )
            )
            )

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

iExtract for IMS 8.2