|
View previous topic :: View next topic
|
| Author |
Message |
crrindia
Active User
.jpg)
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi all please let me know how to put if.. then..else..if conditions in the idcams utility. here I am giving my job.
| Code: |
//**********************************************************************
//* COPY THE DATA FROM ORG VSAM FILE TO TEMP VSAM FILE *
//**********************************************************************
//STEP002 EXEC PGM=IDCAMS,
// COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//FILEIN DD DSN=BAS9365.T.STAKDUMP,
// DISP=SHR
//FILEOUT DD DSN=BAS9365.T.STAKDUMP.TEMP,
// DISP=OLD
//SYSIN DD *
LISTC ENT(BAS9365.T.STAKDUMP)
IF LASTCC = 0 THEN -
VERIFY FILE(FILEIN) -
ELSE IF LASTCC = 0 THEN REPRO INFILE(FILEIN) OUTFILE(FILEOUT) -
ELSE SET MAXCC = 0
/*
//*
|
Rat. |
|
| Back to top |
|
 |
khamarutheen
Active Member

Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
hi frnd,
In general the syntax is
//name IF [relational expression] THEN [comments]
//name ELSE [comments]
//name ENDIF [comments]
For example, to test that a return code is greater than 4, code:
// IF RC > 4 THEN
You can enclose the relational-expression in parentheses.
//TESTCON IF (RC = 8 | RC = 1) | RC = 12 |
// RC = 14) THEN COMMENTS OK HERE
.
.
For example, to test for a return code of 8, code:
//TESTA IF (RC = 8) THEN
So in ur case u r checking for the LASTCC two times. y? if so then close the endif parameter and then go ahead. hope it will work. let me know if any error is thrown. |
|
| Back to top |
|
 |
creator.abhishek
New User

Joined: 07 May 2006 Posts: 32 Location: Pune
|
|
|
|
hi crr...
generaly if else condition used in idcams utility by the basis of last condition code or lasscc, u hav written right,
eg:
//sysin dd *
any command like repro ...................
if lastcc = 0 then other comaand......
else other command..........
end-if
/*
similerly , u r also able to give in if the else steps, like one friend shown above. |
|
| Back to top |
|
 |
|
|