IBM Support

Adding Column Headings to CPYTOIMPF Output Streamfiles

Troubleshooting


Problem

This document shows how column headings can be added to the output of a CPYTOIMPF file to make the result more usable.

Symptom

A resulting .csv file would be easier to read and understand if there was headings for each column

Resolving The Problem

Base in R720

Copy To Import File (CPYTOIMPF) – the ADDCOLNAM parameter indicates whether the column names should be included as the first row in the target file.

ADDCOLNAM - Specifies if the column names should be added to the first record of the to file.
*NONE – (default) don’t include the columns names.
*SQL – The column SQL names will be used to populate the first row.
*SYS – The column System names will be used to populate the first row.


Copy From Import File (CPYFRMIMPF) – the RMVCOLNAM parameter a  indicates whether the first row should be skipped when processing the import file.

RMVCOLNAM - Specifies if the column names should be removed from the from file.
*NO – (default) don’t skip the first row. The copy will begin with the first record from the from file.
*YES – The copy will begin with the second record from the file.
 

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CQ3AAM","label":"IBM i Db2-\u003ECPYTOIMPF \/ CPYFRMIMPF"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

628631808

Document Information

Modified date:
04 December 2024

UID

nas8N1011072