Free software training Videos

Free software training Videos
https://www.youtube.com/user/VLRTraining

List Of Best WebSites

Showing posts with label cl dcl command. Show all posts
Showing posts with label cl dcl command. Show all posts

Friday, 23 November 2012

switch command in cl

The switch built-in function (%SWITCH) compares one or more of eight switches with the eight switch settings already established for the job and returns a logical value of '0' or '1'. The initial values of the switches for the job are determined first by the Create Job Description (CRTJOBD) command; the default value is 00000000.

0
The corresponding job switch is to be tested for a 0 (off).
1
The corresponding job switch is to be tested for a 1 (on).
X
The corresponding job switch is not to be tested


syntax
IF  COND(%SWITCH(0X111XX0))  THEN(GOTO C)
 
 
refer 
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topi
c=/com.ibm.etools.iseries.pgmgd.doc/evfclmst53.htm 

example

Saturday, 17 November 2012

dcl command

 Declare CL Variable (DCL)


DCL command is only used with cl programming.

dcl is used for declaring variables.

 variable  types

                                                                    *DEC                                                             
     A decimal variable that contains a packed decimal value.     
                                                                  
 *CHAR                                                            
     A character variable that contains a character string value. 
                                                                  
 *LGL                                                             
     A logical variable that contains a logical value of either '1'
     or '0'.              


example
DCL        VAR(&NAME) TYPE(*CHAR)

variables names must be started with & symbol
types must started with * symbol