OPC SCAn



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

OPC SCAn

Postby anoopm7 » Thu Feb 28, 2008 4:17 pm

Can some one explain me whts an OPC scan used in JCl.


Thanks in advance.
anoopm7
 
Posts: 12
Joined: Sun Feb 10, 2008 12:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: OPC SCAn

Postby arunprasad.k » Thu Feb 28, 2008 6:45 pm

I used OPC a few years back. I will try answering your query based on the little knowledge I have.

OPC Scan will scan for OPC variables in the OPC tables and and substutite the corresponding values from the OPC table.

Consider the following OPC coding,

//*%OPC SCAN                                               
//*%OPC SEARCH NAME=(CURDAY07%OYMD1,CURDAY10%OYMD1,COMMON) 
//*%OPC SETVAR TGL0990=(OYYYY - 1YR)                       
//   SET PRYR=%TGL0990


This will search the value for OYYYY in the tables mentioned in line 2 and set the value of TGL0990 with OYYYY - 1YR.
In the table defined in line 2, our should had the current year (eg. 2008) for the variable OYYYY, so TGL0990 will have 2007, so the symbolic variable PRYR will have 2007 when it runs.

Similarly you can also use OPC coding for setting values to some symbolic variables based on some conditional parameter.

Consider the following code.
//*%OPC BEGIN ACTION=INCLUDE,                             
//*%OPC       COMP=(&OMM..EQ.10)                         
//        PARM070=A                                       
//*%OPC END ACTION=INCLUDE                               
//*%OPC BEGIN ACTION=INCLUDE,                             
//*%OPC       COMP=(&OMM..EQ.11)                         
//        PARM070=C                                       
//*%OPC END ACTION=INCLUDE                               


When you run this job during the month of October PARM070 will have a value of 'A' and when you run the same job during the month of November it will have 'C'.

Hope you understood, what I am trying to say. Post if you have any questions or concerns.

Arun.
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: OPC SCAn

Postby anoopm7 » Fri Feb 29, 2008 11:13 am

Arun,Thanks for the quick response.

Iam not able to digest all wht u said.Could u plz explzin me why we are using OPC variable(i mean under what special condition).



Thank's in aDvance 8-)
anoopm7
 
Posts: 12
Joined: Sun Feb 10, 2008 12:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: OPC SCAn

Postby arunprasad.k » Fri Feb 29, 2008 2:09 pm

How do you do the following task?

#1 Create a file with daily with the current date as a qualifier?
#2 Your program needs the last calender day or work day of the previous month for some processing? (I hope you know the difference between last work day and calender day).
#3 My last example in the previous post (regarding different parm for different months run)?

I can add so many things but would like to limit with some basic example.

You can do some of the above stuffs with simple coding and some other needs complex coding. But OPC helps the programmers to do the above tasks by simply by substuting the values to the corresponding symbolic variables.

Eventhough Operation Planning and Control is a scheduler, these are value adds (I believe :lol: )

If you still have some questions. Please post which point you do not understand.

Arun.
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: OPC SCAn

Postby anoopm7 » Mon Mar 03, 2008 1:42 pm

Arun,
Your examples were helping..i understand the concept of OPC now.

Thankyou. :D
anoopm7
 
Posts: 12
Joined: Sun Feb 10, 2008 12:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: OPC SCAn

Postby arunprasad.k » Mon Mar 03, 2008 2:42 pm

Good!! Have a nice learning. :P
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post