Here’s logic how to use PERFORM UNTIL. We use PERFORM statement for handling loops in COBOL. Here, this example shows PERFORM with UNTIL.

PERFORM Varying Until Syntax

PERFORM paragraph-name
VARYING a-variable-value
FROM start-value BY increment-value
UNTIL some-condition-is-met

PERFORM Varying UNTIL Example

PERFORM PARA-A
VARYING TEST-1
FROM 1 BY 1
UNTIL TEST-1 > 1000
OR FILE-SWITCH = 'EOF'

Bonus Post

COBOL: How to use PERFORM-TEST-AFTER Logic

You can use this COBOL logic written using PERFORM TEST AFTER. This is one best way of handling loops in COBOL programs. After reading input files you need to validate each record. So this logic helps you as a guide.

Related Posts

LATEST POSTS

Ingesting Data from AWS S3 into Databricks with Auto Loader: Building a Medallion Architecture

In this blog post, we will explore efficient methods for ingesting data from Amazon S3 into Databricks using Auto Loader. Additionally, we will discuss how to perform data transformations and implement a Medallion architecture to improve the management and processing of large datasets. What is the Medallion Architecture? The Medallion architecture is a data modeling…

Exploring Databricks Unity Catalog – System Tables and Information _Schema: Use Cases

Databricks Unity Catalog offers a unified governance solution for managing structured data across the Databricks Lakehouse platform. It enables organizations to implement fine-grained access controls, auditing, and monitoring, enhancing data governance and compliance. Key functionalities include centralized metadata management, data discovery, dynamic reporting, and data lineage tracking, optimizing performance and collaboration.

Something went wrong. Please refresh the page and/or try again.