for *char data area. According to create other data area types
use CL command

@param string $DataAreaName
@param string $DataAreaLib *CURLIB is correct, the default with CRTDTAARA.
@param int $size
@return bool
@throws \Exception
558385
public function createDataArea($DataAreaName = '', $DataAreaLib = "*CURLIB", $size = 2000)
    {
        if ($DataAreaName !='' && $this->DataAreaName == NULL) { /*was not set before*/
            $this->setDataAreaName($DataAreaName , $DataAreaLib);
        }

        if ($size > 2000 || $size <= 0) {
            $dataAreaLen = 2000;
        } else {
            $dataAreaLen = $size;
        }

        $cmd = sprintf("QSYS/CRTDTAARA DTAARA(%s/%s) TYPE(*CHAR) LEN($dataAreaLen)",
            ($DataAreaLib != '' ? $DataAreaLib : $this->DataAreaLib),
            ($DataAreaName !='' ? $DataAreaName : $this->DataAreaName));

        // @todo get CPF code
        if (!$this->ToolkitSrvObj->CLCommand($cmd)) {
            $this->ErrMessage =  "Create Data Area failed." . $this->ToolkitSrvObj->getLastError();
            throw new \Exception($this->ErrMessage);
        }

        return true;
    }
482152
public function &expectedDatasetSize($size)
    {
        if (in_array($size, [FieldInterface::SIZE_TINY, FieldInterface::SIZE_SMALL, FieldInterface::SIZE_MEDIUM, FieldInterface::SIZE_NORMAL, FieldInterface::SIZE_BIG])) {
            $this->expected_dataset_size = $size;

            if ($this->id_field instanceof IntegerField && $this->id_field->getSize() != $this->expected_dataset_size) {
                $this->id_field = null; // Reset ID field so it can be recreated with the new size
            }
        } else {
            throw new InvalidArgumentException("Value '$size' is not a valid dataset size");
        }

        return $this;
    }
64267
public static AreaF area(final AreaSizeF size)
  {
    Objects.requireNonNull(size, "Size");
    return AreaF.of(0.0f, size.sizeX(), 0.0f, size.sizeY());
  }
858279
public static function fromSizeAndStyle(int $size, string $style): self
    {
        $minimumSize = 1;

        if ($minimumSize > $size) {
            throw Exception\InvalidIndentSizeException::fromSizeAndMinimumSize(
                $size,
                $minimumSize
            );
        }

        $characters = [
            'space' => ' ',
            'tab' => "\t",
        ];

        if (!\array_key_exists($style, $characters)) {
            throw Exception\InvalidIndentStyleException::fromStyleAndAllowedStyles(
                $style,
                ...\array_keys($characters)
            );
        }

        $value = \str_repeat(
            $characters[$style],
            $size
        );

        return new self($value);
    }
369871
function GrantAddContentToLayoutArea(Area $area)
    {
        $result = $this->Grant(BackendAction::Create(), $area);
        if (!$result->ToBool())
        {
            return $result;
        }
        return $this->GrantAddContentToLayout($area->GetLayout());
    }
305630
public static function textarea($name, $value = null, array $options = [])
    {
        self::exclure($options);

        //for textarea size
        $options = self::setTextAreaSize($options);

        $options['id'] = self::getIdAttribute($name, $options);
        $options['name'] = $name;

        unset($options['size']);

        $options = Html::attributes($options);

        return '<textarea'.$options.'>'.e($value).'</textarea>';
    }
1340325
function &addArea($name = null) {
            if (!$name) {
                $name = uniqid(microtime(true), true);
            }
            $this->areas[$name] = new Area();
            return $this->areas[$name];
        }
30480
public function update($dataItem)
    {
        /** @var DataItem $dataItem */
        $dataItem   = $this->create($dataItem);
        $data       = $this->cleanData($dataItem->toArray());
        $connection = $this->getConnection();
        unset($data[ $this->getUniqueId() ]);

        if (empty($data)) {
            throw new \Exception("DataItem can't be updated without criteria");
        }

        $connection->update($this->tableName, $data, array($this->uniqueId => $dataItem->getId()));
        return $dataItem;
    }
344511
public function render_area_files($component, $area, $submissionid) {
        global $USER;

        return $this->get_renderer()->assign_files($this->context, $submissionid, $area, $component);

    }
1073891
public static function getImageFromArray($data, $size, $dimensions = false)
    {
        if($dimensions === true)
        {
            $image = (object) [
                'url' => $data['sizes'][$size],
                'width' => $data['sizes'][$size . '-width'],
                'height' => $data['sizes'][$size . '-height']
            ];
        }
        else
        {
            $image = $data['sizes'][$size];
        }
        return $image;
    }
100681
public static <S> AreaSizeD toAreaSizeD(final PAreaSizeD<S> a)
  {
    Objects.requireNonNull(a, "area size");
    return AreaSizeD.of(a.sizeX(), a.sizeY());
  }
1119932
public static function area(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("area", $content, $attributes);
    }
1168537
public static function createVarchar($name, $size)
    {
        $field = new DatabaseField($name, self::TYPE_VARCHAR);
        $field->m_constraint = intval($size);
        return $field;
    }
274608
protected static function getLength(&$len, &$bytes, $data)
    {
        $len = ord($data[1]);
        $bytes = 0;
        // Testa se tamanho menor/igual a 127 bytes,
        // se for, então $len já é o tamanho do conteúdo
        if ($len & 0x80) {
            // Testa se tamanho indefinido (nao deve ocorrer em uma codificação DER)
            if ($len == chr(0x80)) {
                // Tamanho indefinido, limitado por 0x0000h
                $len = strpos($data, chr(0x00) . chr(0x00));
                $bytes = 0;
            } else {
                //é tamanho definido. diz quantos bytes formam o tamanho
                $bytes = $len & 0x0f;
                $len = 0;
                for ($i = 0; $i < $bytes; $i++) {
                    $len = ($len << 8) | ord($data[$i + 2]);
                }
            }
        }
    }
918129
public static AreaD area(final AreaSizeD size)
  {
    Objects.requireNonNull(size, "Size");
    return AreaD.of(0.0, size.sizeX(), 0.0, size.sizeY());
  }
164309
private function checkSize(&$size)
    {
        if ( ! NumberChecker::isIntValue($size)) {
            throw new Exceptions\InvalidImageSizeException(
                'Avatar size specified must be an integer.'
            );
        }

        $size = (int) $size;

        if ( ! NumberChecker::isIntBetween($size, 0, 512)) {
            throw new Exceptions\InvalidImageSizeException(
                'Avatar size must be within 0 pixels and 512 pixels.'
            );
        }
    }
821438
private function migrateSize(?string $size): ?string
    {
        if ($size === null) {
            return null;
        }


        $columns = array_map(
            function (array $column) {
                if ($column['width'] === 'auto') {
                    $column['width'] = 'equal';
                }

                return $column;
            },
            StringUtil::deserialize($size, true)
        );

        return serialize($columns);
    }