On Thu, Oct 12, 2017 at 11:04 AM, [email protected] <[email protected]>
wrote:

> Hi John
>
>  Could you give us a sample of the ftp job or the rexx?
>

​I don't know that I can give any REXX code which would be generic enough
to be helpful. Where do you get your list of DSNs to be transferred? Where
do you want the files to be stored on the Linux box? Do you want the file
name on the Linux box to be the same as the DSN on the z/OS system? If not,
how do you map the z/OS DSN to the Linux file name?

The REXX program would need to be able to read, or generate, this list. The
following "snippet" of REXX may be of some help as to how to do this.​

/* REXX PROGRAM DB2FTP */
/* DO SOMETHING TO GENERATE THE DSN. STEM VARIABLES */
/* */
/* SET UP THE TOP OF THE JOB IN THE JOB. STEM */
JOB.1='//DB2FTP JOB CLASS=F,MSGCLASS=H'
JOB.2='//SENDFILE EXEC PGM=FTP,PARM=LINUX (EXIT'
JOB.3='//SYSPRINT DD   SYSOUT=*'
JOB.4='//OUTPUT   DD   SYSOUT=*'
JOB.5='//INPUT    DD   *'
JOB.6='USERID' /* CHANGE TO THE PROPER VALUE */
JOB.7='PASSWORD' /* CHANGE TO THE PROPER VALUE */
JOB.8='cd /the/receiving/directory' /* EVERY FILE GOES HERE */
JOB.9='PUT DSN' /* PLACE HOLDER, REPLACED LATER */
JOB.10='QUIT'
JOB.11='/*'
JOB.12='//'
JOB.13='/*EOF'
JOB.0=13
/* AT THIS POINT, THE DSNS TO BE TRANSFERRED ARE IN THE
   DSN. STEM WITH DSN.0 BEING THE NUMBER OF ENTRIES 1..?
   SO CREATE & SUBMIT A JOB FOR EACH DSN .
*/
DO I=1 TO DSN.0 /* SUBMIT A JOB FOR EACH DSN */
   JOB.9='put' DSN /* REPLACE THE DSN IN THE PUT COMMAND */
   "EXECIO "JOB.0" DISKW INTRDR(FINIS STEM JOB."
END
/* END OF THIS PART */

I don't know where the actual list of DSNs would come from, so I don't know
how to set up the DSN. stem variables. You need to modify the "cd" command
in JOB.8 to be the correct directory in Linux. The names of the files in
this directory will be the same as the DSN on z/OS. I don't try to "map"
them to something "reasonable".

This could be run in batch TSO with JCL similar to:

//SUBMITS EXEC PGM=IKJEFT01,REGION=0M
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DISP=SHR,DSN=dsn.containing.rexx.program
//INTRDR DD SYSOUT=(*,INTRDR)
//SYSTSIN DD *
%DB2FTP
/*
//

​You will need to change the value in the CLASS= and MSGCLASS= to be
correct. You will need to have multiple initiators ​of the proper class
started. And, critically, the class specified in the CLASS= must have the
DUPL_JOB attribute set to NODELAY. The z/OS (JES2) command to do this for
(example) class F would be: $TJOBCLASS(F),DUPL_JOB=NODELAY. The default is
DELAY and if left at that, the job will run one at a time. Or you need to
change the REXX somehow to guarantee that the JOB name is unique.



>
> Thanks a lot !
>
> Jason Cai
>
>


-- 
I just child proofed my house.
But the kids still manage to get in.


Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to