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
 
Passing parameter from JCL to a FOCUS program

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

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Tue Apr 13, 2010 8:57 am    Post subject: Passing parameter from JCL to a FOCUS program
Reply with quote

Hi,

Can anyone help me out with how to pass data from JCL SYSIN card to a FOCUS program.

Below is the FOCUS pgm,

Code:
TABLE FILE REPORT                 
PRINT AMT AS "PRICE"         
INV AS "INV-NO"             
INVDT AS "INV-DATE"           
BY AREA AS "AREA"         
IF INVDT FROM '100330'         
            TO '100330'           
ON TABLE SAVE AS OUTFILE FORMAT WP
END                               


The date field hard coded here must come from the JCL.
Back to top
View user's profile Send private message

nemo_budd

New User


Joined: 30 Mar 2008
Posts: 7
Location: Pune

PostPosted: Tue Apr 13, 2010 12:31 pm    Post subject: Reply to: Passing parameter from JCL to a FOCUS program
Reply with quote

You can pass the data from JCL to focus as below.

Code:
 
//SYSIN      DD *
EX FOCUS  INVBEGDT='100330', INVENDDT='100330'



Code:


TABLE FILE REPORT                 
PRINT AMT AS "PRICE"         
INV AS "INV-NO"             
INVDT AS "INV-DATE"           
BY AREA AS "AREA"         
IF INVDT FROM '&INVBEGDT'         
            TO '&INVENDDT'           
ON TABLE SAVE AS OUTFILE FORMAT WP
END   



If the dates are changed on regular basis like monthly or weekly, then you can calculate the date in your focus exec itself using date functions, without passing from JCL.
Back to top
View user's profile Send private message
karthickpearl

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Tue Apr 13, 2010 1:04 pm    Post subject: Reply to: Passing parameter from JCL to a FOCUS program
Reply with quote

Your suggestion have worked.
Thanks a lot man...

I also tried the following and it wokred, but yours is a better way.

//STARTDT DD *
//050101
//ENDDT DD *
//100330

And in FOCUS

-READ STARTDT &START.I6.
-READ ENDDT &END.I6.
TABLE FILE REPORT
PRINT AMT AS "PRICE"
INV AS "INV-NO"
INVDT AS "INV-DATE"
BY AREA AS "AREA"
IF INVDT FROM '&START'
TO '&END'
ON TABLE SAVE AS OUTFILE FORMAT WP
END
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 Dynamically updating the MQ monitorin... Anilkumarmq Java & MQSeries 0 Fri Jun 08, 2018 2:05 pm
No new posts To Understand EXECIO Read Parameter OPEN Ilavenil CLIST & REXX 2 Tue May 29, 2018 1:59 pm
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm
No new posts Cobol program till a given time or fo... ankita agarwal COBOL Programming 7 Fri May 18, 2018 2:24 pm

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