|
|
| Author |
Message |
new2cobol
Active User
Joined: 04 Jan 2006 Posts: 70
|
|
|
|
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  |
|
| Back to top |
|
 |
References
|
Posted: Wed Apr 26, 2006 9:26 pm Post subject: Re: Can I do a Connect : Direct using REXX? |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3081 Location: Charlotte,NC USA
|
|
|
|
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 |
|
 |
new2cobol
Active User
Joined: 04 Jan 2006 Posts: 70
|
|
|
|
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 |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3081 Location: Charlotte,NC USA
|
|
|
|
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 |
|
 |
new2cobol
Active User
Joined: 04 Jan 2006 Posts: 70
|
|
|
|
| I guess that is what I want, innit? Build SYSIN DD params dynamically! Thanks superk!!! |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3081 Location: Charlotte,NC USA
|
|
|
|
| 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 |
|
 |
|
|