IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Suggestion Required to FTP file from M/F to win for Infopac


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rajuvendra Nagvanshi

New User


Joined: 03 Oct 2008
Posts: 4
Location: USA

PostPosted: Thu Nov 27, 2008 12:28 am
Reply with quote

Hi,
After searching the forum and not getting the answer icon_sad.gif , I am posting my query in this forum.
We are moving from MVS Infopac Report Distribution to Web Infopac Report Distribution.
Each Platform (Unix,AS400 etc) sends a flat file Report to Mainframe and a job loads that report in Infopac.
Current Setup:
There is one generic Proc used to load the file in Infopac called in JCL.
and a overide step in JCL itself (Jcl snapshot below).
Code:

//EXEC0010 EXEC OLINFOP,                     
//             INPAGE1='MY.INFOPAC.VSAM',   
//             LAB='EXPDT=99000',           
//             INPAKY1='&&TEMP99',           
//             PARM1='PARM1',               
//             PARM2='PARM2',               
//             SPC1='',                     
//             UNIT=CART                     
//*                                         
//STEP0020.REPORT1 DD DSN=MY.REPORT.RPT1(0),
//             DISP=SHR                     
//STEP0020.REPORT2 DD DSN=MY.REPORT.RPT2(0),
//             DISP=SHR                     
//STEP0020.REPORT3 DD DSN=MY.REPORT.REPT3(0),
//             DISP=SHR     

Code:

1. First parm contains a Forced ReportID and the Report ID.               
##FILE INPUT  01 REPORT1-F  REPORT1
##FILE INPUT  01 REPORT2    REPORT2
##FILE INPUT  01 REPORT3-M  REPORT3

2. Second parm contain VSAM file to copy the report which needs to be loaded.
Code:

 DELETE -                                 
        MY.INFOPAC.VSAM -                 
        PURGE                             
        SET MAXCC=0                       
                                         
 DEFINE CLUSTER -                         
          (NAME(MY.INFOPAC.VSAM) -       
           MODEL(MY.INFOPAC.MODEL.VSAM) -
           CYLINDERS(148 1) -             
           VOLUMES(*))                   


Requirement:
Since there are many jobs which call this generic proc, we would like a new FTP step to be added to this proc and FTP the report file to windows.

Issue:
The name of the data set and the report ID is passed from JCL to current proc. How can I add the step to the current proc to get the file name and the report ID without changing any JCL's and FTP it to Windows server?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 27, 2008 1:46 am
Reply with quote

Rajuvendra Nagvanshi wrote:
Issue: The name of the data set and the report ID is passed from JCL to current proc.


How? Through variables?

Rajuvendra Nagvanshi wrote:
How can I add the step to the current proc to get the file name and the report ID without changing any JCL's and FTP it to Windows server?


This is where you've lost me. Where would the file name and the report ID come from?

If you're asking what I think you're asking, presumably you already know that variables defined within the JCL can only be referenced within the JCL. If you want to use variables elsewhere, such as part of the input to a program or utility, then you must have a program that can process the variables and write out their actual value to a dataset, which can then be passed onto another step and read as input.
Back to top
View user's profile Send private message
Rajuvendra Nagvanshi

New User


Joined: 03 Oct 2008
Posts: 4
Location: USA

PostPosted: Thu Nov 27, 2008 2:53 am
Reply with quote

Thanks for reply Kevin.
The name of the datasets which I want to FTP are defined in the JCL itself as shown in my EXEC (Also show above) step e.g.:
STEP0020 is the step of Report loading PROC.

Code:
//STEP0020.REPORT1 DD DSN=MY.REPORT.RPT1(0),
//             DISP=SHR                     

so my report file name is MY.REPORT.RPT1(0)

Report ID is forced ID( Report ID on report file can be different than the actual report id used for loading report). This Forced report ID and Report ID is defined in the Parmlib (PARM1) eg:
FORCED REPORT ID -->REPORT1-F
REPORT ID -->REPORT1


Code:
##FILE INPUT  01 REPORT1-F  REPORT1


My current aim is to FTP the file MY.REPORT.RPT1 to a window server where it would go and sit as REPORT1-F.TXT (may be timestamp added to file name).
Since all my report loading jobs calls generic proc. I would like to add a FTP step to generic proc so that it is minimal change.

So I need to somehow read the file name (which need to be FTPed) and the report ID from Parmlib.
Please let me know if it makes things clear for you.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 27, 2008 9:02 am
Reply with quote

Hello and welcome to the forum,

I am probably misunderstanding something, but why not read this "Parmlib (PARM1)" and create/modify some member that has all of the ftp commands and you put in the info from PARM1?

Instead on inserting only an ftp step, you would insert a step to create the ftp member also.

As i mentioned, i may be missing something. . .
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 27, 2008 9:21 am
Reply with quote

dick scherrer wrote:
As i mentioned, i may be missing something. . .


I have the same feeling ...
Back to top
View user's profile Send private message
Rajuvendra Nagvanshi

New User


Joined: 03 Oct 2008
Posts: 4
Location: USA

PostPosted: Thu Nov 27, 2008 10:01 am
Reply with quote

What PGM should i use to read this Parm?
Also if i need to create a new member, then I have 100's of JCL for each reports for which I would need to create a new member which I don't want.

Another issue will be how to read the Report file name which i have to FTP present in the EXEC step.

Do I need to use some ezytrieve or any other program to achieve this?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 27, 2008 10:20 am
Reply with quote

Hello,

Quote:
What PGM should i use to read this Parm?
Your choice, but i'd suggest using a language you are familiar and comfortable using.

Quote:
Do I need to use some ezytrieve or any other program to achieve this?
Use the language you know best.

Quote:
Also if i need to create a new member, then I have 100's of JCL for each reports
You could have 1 jcl and 1 pds. In a pds member would be ftp statements for that transmission.

Suggest you move forward working thru the mechanics of transwmitting a single file and then expand the process to do multiple transmissions.
Back to top
View user's profile Send private message
Rajuvendra Nagvanshi

New User


Joined: 03 Oct 2008
Posts: 4
Location: USA

PostPosted: Thu Nov 27, 2008 11:06 am
Reply with quote

Thanks for replying.
But still my question was since it is a parm ,how to read it since its not a file in my program.
I was planning to use ezytrieve.
How many steps will possibly be needed to be added to proc to accomplish this?

Quote:
How to read the file name (MY.REPORT.RPT1)?


If you could tell me how to read the Parm1 and then the file name (MY.REPORT.RPT1) from the JCL, it would be great.

Also is there any secure way of sending the File from M/F to FTP?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top