# jCL IF S

Updated: 10/19/2020, 10:24:56 AM
Created: 10/19/2020, 10:24:56 AM
Last Updated By: Daniel Klein
Read Time: 1 minute(s)

Tags: jcl

# Description

The command conditionally executes a command depending on the presence or absence of an active select list. It takes the general form:

IF {#} S command
1

where:

  • # tests for the absence of an active select list.
  • command is a valid jCL  command.

# Note

IF S  will execute command if there is an active select list. IF # S will execute command if there is not an active select list.

# Example

021 HSELECT SALES WITH VALUE > "1000"
022 PH
023 IF S  G 100
1
2
3

If the SELECT command generates an active select list, control will be transferred to label 100.

Back to jCL.