Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
if.. then else.. if.. conditions in the idcams utility.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Tue Nov 22, 2005 12:16 pm    Post subject: if.. then else.. if.. conditions in the idcams utility.
Reply with quote

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
View user's profile Send private message

khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Tue Nov 22, 2005 2:52 pm    Post subject: IF statement
Reply with quote

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
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Mon Jul 10, 2006 3:19 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts IDCAMS Allocate & Repro pahiker JCL & VSAM 9 Thu Aug 24, 2017 7:28 pm
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us