3.33 mnewstr - Generate Fixed String Data

Define the character string to generate at v= parameter, and pass the new column name at a= parameter. Multiple columns can be generated at a time.

Format

mnewstr a= [v=] [l=] [o=] [-nfn] [-nfno] [--help] [--version]

Parameters

a=

Field name(s) of the new data.

 

Define multiple field names separated with a comma in between the field names.

 

This argument is not required when -nfn,-nfno options are specified.

v=

Specify the new character string to generate.

 

Define multiple field separated with a comma in between the values.

 

The number of fields must be the same as the number of field names defined at a=.

l=

Number of rows of random data to generate [default value:10].

Example

Example 1: Basic Example

Generate a new dataset with characters strings custNo and A0001 printed in 5 rows, and name the fields as attribute and code respectively.

$ mnewstr a=attribute,code v=custNo,A0001 l=5 o=rsl1.csv
#END# kgnewstr a=attribute,code l=5 o=rsl1.csv v=custNo,A0001
$ more rsl1.csv
attribute,code
custNo,A0001
custNo,A0001
custNo,A0001
custNo,A0001
custNo,A0001

Related Commands

mnewnumber : Generate list of sequential numbers in a new dataset.

mnewrand : Generate random numbers in a new dataset.