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 DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm

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