Closed MohamedSabthar closed 1 month ago
Description: Consider the following copybook schema:
01 REC. 03 FIELD-01 PIC XXX VALUE 'YES'. 03 FIELD-02 PIC 9(02) VALUE 10.
When a VALUE clause is provided in the schema, the copybook module should use these values when generating ASCII string using toCopybook() API.
toCopybook()
For the above schema the module should generate following string YES10 when no explicit values provided to the fields.
YES10
import ballerina/io; import ballerinax/copybook; public function main() returns error? { copybook:Converter converter = check new ("schema.cbl"); map<json> inputData = {REC: {}}; // no values provided for FIELD-01 and FIELD-02 string ascii = check converter.toCopybook(inputData); io:println(ascii); // YES10 }
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description: Consider the following copybook schema:
When a VALUE clause is provided in the schema, the copybook module should use these values when generating ASCII string using
toCopybook()
API.For the above schema the module should generate following string
YES10
when no explicit values provided to the fields.Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):