Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Can I do a Connect : Direct using REXX?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
new2cobol

Active User


Joined: 04 Jan 2006
Posts: 70

PostPosted: Wed Apr 26, 2006 9:26 pm    Post subject: Can I do a Connect : Direct using REXX?
Reply with quote

I have been asked to connect direct a number of files, say X | X varies every day, to another machine. I know the names of the files, I know the location it is to be shipped. Now as X is varying, I can't do a JCL to do the stuff... I know FTP using REXX, so is it possible to do a connect direct using REXX?

If not I wil have to hit myself with a mace. I suggested Connect Direct as the mode of file transfer icon_cry.gif icon_cry.gif
Back to top
View user's profile Send private message
References
PostPosted: Wed Apr 26, 2006 9:26 pm    Post subject: Re: Can I do a Connect : Direct using REXX? Reply with quote

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3081
Location: Charlotte,NC USA

PostPosted: Wed Apr 26, 2006 10:52 pm    Post subject: Re: Can I do a Connect : Direct using REXX?
Reply with quote

Sure.

I mean, there's no direct REXX-to-C : D interface - you'll still need to use the DMBATCH utility and you'll still need to use the SUBMIT PROC command, but it works the same way in REXX as in a batch job.
Back to top
View user's profile Send private message
new2cobol

Active User


Joined: 04 Jan 2006
Posts: 70

PostPosted: Thu Apr 27, 2006 1:28 am    Post subject: Re: Can I do a Connect : Direct using REXX?
Reply with quote

Ok, superk, you mean, I can do a TSO EXEC DBMBATCH, after including all the libraries?

How do I include the submit proc in REXX?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3081
Location: Charlotte,NC USA

PostPosted: Thu Apr 27, 2006 2:06 am    Post subject: Re: Can I do a Connect : Direct using REXX?
Reply with quote

No, you would use the TSO CALL command (presuming you are running in a TSO address space):

Code:

/* REXX */
... housekeeping stuff ...
"CALL *(DMBATCH)   'YYSLYNN'"   
or
"CALL 'CONNECT.DIRECT.LOADLIB(DMBATCH)'   'YYSLYNN'"
...


You still need the same commands in the SYSIN DD:

Code:

  SIGNON ESF=YES             
  SUB PROC=Procname
  SIGNOFF                     

  or

  SIGNON ESF=YES             
  SUB DSN=MY.PROCESS.LIB(Procname)
  SIGNOFF                     


So, as you can probably tell, I don't see any advantage to doing this with REXX, other than allowing you to build the SYSIN DD contents dynamically. If your Process(es) allow for variable input and/or output filenames, then you should be all set.

Don't forget too that there are restrictions (site-specific) that specify how many processes you're allowed to submit at one time.
Back to top
View user's profile Send private message
new2cobol

Active User


Joined: 04 Jan 2006
Posts: 70

PostPosted: Thu Apr 27, 2006 2:29 am    Post subject:
Reply with quote

I guess that is what I want, innit? Build SYSIN DD params dynamically! Thanks superk!!!
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3081
Location: Charlotte,NC USA

PostPosted: Thu Apr 27, 2006 2:35 am    Post subject: Re: Can I do a Connect : Direct using REXX?
Reply with quote

The first shop that I worked in where I actually dealt with CONNECT : Direct used DB2 to dynamically build the Process statements for each job at runtime. The next shop first used Quikjob, then SAS, to do the same thing. REXX would work just as well.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1