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

Start .bat file on PC from Mainframe with job return code CC


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
DS
Warnings : 1

New User


Joined: 09 Jun 2005
Posts: 25
Location: Bangalore

PostPosted: Sat Jul 09, 2011 1:47 am
Reply with quote

Hi,

I need to download a Mainframe dataset to my local PC using a JCL. That is if we submit a job it will send Sample.txt file straight to local PC after generating the dataset 'AX26SYS.VP.PROD.D110708.SAMPLE.TXT'

Dataset: FORMAT=FB, LRECL=3785 bytes
Text file: Same size with name Sample.txt

Mainframe is maintained by Datacenter and We don't have any FTP server in local shop, so Mainframe can't send files. What are the possble options? Please provide details.

Option I'm thinking: Prepare batch script () on local PC and run it after JOB as a successor. But question is How I can use MAXCC to trigger the batch script. We have TWS (IBM TWS) scheduler in our environment.

Thanks, DS.
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: Sat Jul 09, 2011 1:52 am
Reply with quote

Hello,

Your mainframe probably runs an ftp service.

From the pc, log onto the mainframe ftp and "pull" the file from the mainframe to the pc.

There is no reason to get complicated or tie things up with "maxcc" or the like. . .

Also, most organizations will not permit a mainframe batch job to "send" an ftp to a pc as the pc would require an ftp service, which is rarely permitted.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Jul 09, 2011 1:58 am
Reply with quote

Your local PC is running a scheduling agent?
Back to top
View user's profile Send private message
DS
Warnings : 1

New User


Joined: 09 Jun 2005
Posts: 25
Location: Bangalore

PostPosted: Sat Jul 09, 2011 2:06 am
Reply with quote

Hi,

The one suggested is manual PULL right? but we want to automate the process with the JCL or JCL run script based on MAXCC. If MAXCC = 0 or 4 then GENERATE Sample.txt file

Currently we're doing explicit run i.e. manually PULL the file by running a .bat script. Which we're not interested.

Our aim is to AUTOMATE the process to get the Sample.txt file from Mainframe, automatic process.

Thanks.
Back to top
View user's profile Send private message
DS
Warnings : 1

New User


Joined: 09 Jun 2005
Posts: 25
Location: Bangalore

PostPosted: Sat Jul 09, 2011 2:09 am
Reply with quote

Hi,

No my local PC doesn't have any Scheduling Agent.

Thanks.
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: Sat Jul 09, 2011 2:12 am
Reply with quote

Hello,

I guess you were not paying attention. . .

Most organizations will not permit you to run a batch job on the mainframe that sends a file via ftp to a pc. . .

You are way too hung up on maxcc - it most likely has no place in the topic. . .

You might consider sending the data as an e-mail attachment . . . But this too has logistics to consider.

Quote:
Currently we're doing explicit run i.e. manually PULL the file by running a .bat script. Which we're not interested.
Is there some reason you cannot automate the batch process on the pc?
Back to top
View user's profile Send private message
DS
Warnings : 1

New User


Joined: 09 Jun 2005
Posts: 25
Location: Bangalore

PostPosted: Sat Jul 09, 2011 2:13 am
Reply with quote

Hi,

I can setup Windows scheduler to run .bat file at a specific time & day or date etc. But some days the job that produces Dataset fails/does not run at all in such case my target file contains obsolete data.

Thanks, DS.
Back to top
View user's profile Send private message
DS
Warnings : 1

New User


Joined: 09 Jun 2005
Posts: 25
Location: Bangalore

PostPosted: Sat Jul 09, 2011 2:19 am
Reply with quote

Thanks Dick,

The operator submits Mainframe job manully as per the RUN SHEET in TSO between 10:00 PM - 11:30 PM. Later operator run .bat script manully.

We would like to have minimal manual intervention to get Sample.txt file

Appreciate your advice.

Thanks, DS.
Back to top
View user's profile Send private message
DS
Warnings : 1

New User


Joined: 09 Jun 2005
Posts: 25
Location: Bangalore

PostPosted: Sat Jul 09, 2011 2:27 am
Reply with quote

Hello,

Got your point. I agree with D.Sch fully on not permitting to run batch job. I am not much on to MAXCC but looking for alternatives.

We have XMITIP utility on our envuronment, we're using to send email notifications.

Please suggest and [i] provide glimpse on e-mail attachment [\i]. If it is not expensive that may be go-getter for me. Appreciate experts time on this.

Thanks, DS.
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: Sat Jul 09, 2011 2:46 am
Reply with quote

Hello,

Quote:
If it is not expensive that may be go-getter for me.

As far as i know, XMITIP is free. Whether this might work could depend on the volume of data.

Something to consider would be to "destroy" the content of the mainframe file so that obsolete data could not be sent. The target system should be able to handle a data file that contains a file of "NO DATA AVAILABLE". Then the .bat could be executed every day and the new data would be pulled or the "NO DATA AVAILABLE" would be pulled. There woule be no need for the operator to decide every day. . .
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 -> IBM Tools

 


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