OPC SCAN SETVAR



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

OPC SCAN SETVAR

Postby jmartind » Fri Jan 22, 2010 6:30 pm

Please, I am trying to use an OPC variable for the return code of a JCL and I am not able to find it.
Could you help me to find it?

I send you an example of my JCL , but my Temp Variable doesn't works
The variable TRC is defined in TWS as default value = 0, but always give as result 12.

//CADENAY JOB ('ACCOUNT INFO'),'SISTEMAS',
// CLASS=X,MSGCLASS=X,
// COND=(90,EQ)
//*%OPC SCAN
//PASO002 EXEC PGM=IKJEFT01,PARM='%CODE 90'
//EXEC DD DISP=SHR,DSN=FERRONA.ISPEXEC
//SYSTSPRT DD DUMMY
//SYSTSIN DD DUMMY
//*%OPC SETVAR TRC=90

The other JCL is:

//CADENAYY JOB ('ACCOUNT INFO'),'SISTEMAS',
// CLASS=A,MSGCLASS=X
//*%OPC SCAN
IF TRC = 90 THEN GOTO PASO0010 ELSE EXIT 69
LABEL PASO0010
//PASO0010 EXEC PGM=IEFBR14
//DD1 DD DUMMY

This JCL cancel with misplaced DD in the IF line

Thank you very much.
jmartind
 
Posts: 4
Joined: Fri Jan 22, 2010 4:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: OPC SCAN SETVAR

Postby dick scherrer » Sat Jan 23, 2010 12:34 am

Hello and welcome to the forum,

The problem is not really a misplaced DD. The problem is that the IF statement is wrong.

This is the Table of Contents for the JCL Reference manual:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/CONTENTS

Suggest you review how IF/THEN/ELSE is coded. . .

Also, suggest you bookmark that page (and download a copy locally) as the JCL Reference is something that is very often used.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: OPC SCAN SETVAR

Postby jmartind » Tue Jan 26, 2010 10:27 pm

Thank you very much.
I will try it with the information you sent to me, and hope it'll works ok soon.
jmartind
 
Posts: 4
Joined: Fri Jan 22, 2010 4:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: OPC SCAN SETVAR

Postby dick scherrer » Wed Jan 27, 2010 1:47 am

You're welcome :)

Someone will be here if there are questions or problems.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: OPC SCAN SETVAR

Postby jmartind » Tue Feb 02, 2010 5:05 pm

Hello again,
I tried it, but I'm not sure that the problem is a sintaxis with the IF/THEN/ELSE.
After review some OPC manuals and the JCL Reference manual you sent to me ,I have seen that the sintax is different if I use the Conditional expression with OPC SCAN IF/THEN/ELSE command or with the //IF command of the JCL. but I couldn't find an example of how code an IF/THEN/ELSE with OPC using variables.
Has anybody an example?

Thank you very much!
jmartind
 
Posts: 4
Joined: Fri Jan 22, 2010 4:07 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post