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 Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

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