Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Multiple file transfer from Unix via mainframe to LAN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
David Casson

New User


Joined: 24 May 2012
Posts: 4
Location: United Kingdom

PostPosted: Fri May 25, 2012 8:05 pm    Post subject: Multiple file transfer from Unix via mainframe to LAN
Reply with quote

Hi. I am not sure if this has been done elsewhere, but I am looking for a proof of concept!

The challenge is to get a variable number of files from an FTP server, via the mainframe, and then onto a LAN directory. The solution we are proposing is as follows

1. Get a list of the file names existing on the FTP server using the ls command.
2. Build the FTP commands to transfer the files to the mainframe, dynamically allocating the mainframe files.
3 Listcat the mainframe files.
4. build the Connect:Direct commands into a dataset using the Listcat for the mainframe files and the ls listing for the file names on the LAN directory (as they have to be the original file names!)
5 Use the RUN JOB(DSN=nnnn) command to execute the Connect:Direct transfer

I cannot see that this would not be technically possible, just want some re-assurance that I am going in the right direction
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Fri May 25, 2012 8:37 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

You should be able to do what you propose. . . .

I'm not sure why the RUN JOB is mentioned - it is not even used many places. Once JCL and control statements have been created, many would use the Internal Reader. Or create an entry in the scheduling system that when a particular dataset is created, the ftp job is run.

Probably i'm missing something.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri May 25, 2012 8:56 pm    Post subject: Reply to: Multiple file transfer from Unix via mainframe to
Reply with quote

You could avoid having to use LISTCAT if you stored those files as PDS members. Just a thought.
Back to top
View user's profile Send private message
David Casson

New User


Joined: 24 May 2012
Posts: 4
Location: United Kingdom

PostPosted: Tue May 29, 2012 7:34 pm    Post subject: Reply to: Multiple file transfer from Unix via mainframe to
Reply with quote

You are quite correct that I don't need the LISTCAT as the mainframe filenames are already built into the FTP GET process. I just need to extract the file names from here to build into the ConnectDirect command structure.
Having said that, I am still having a bit of trouble running the process. I tried building all the commands into a dataset and then using RUN JOB, but that is not allowed as this command can only be done from within a PROCESS. Tried running from within the PROC, but got more command errors.
Here is what I have so far
Code:
//CDSEND   EXEC CDSEND,PRIVPROC='NUTSO.CASSOND.DATA'   
   SIGNON USERID=#USER                                 
   SUBMIT PROC=CDDG063 -                               
   MAXDELAY=QUEUED                                     
   SIGNOFF             


PROC is:-

Code:
CDDG063  PROCESS  SNODE=APPL032GCD           
                                             
COPYSTEP COPY -                               
  FROM (PNODE DSN=&&MVSDSN DISP=SHR) -       
  TO   (SNODE DSN=&&DSN2 DISP=RPL)           
                                             
PROCSTEP RUN JOB(                    -       
           DSN=NUZ1D.PUNDG063.JNR.FILE1.CD  -
                )                     

NUZ1D.PUNDG063.JNR.FILE1.CD is:-

&&MVSDSN=NUZ1D.PUNDG061.JNR.ORI.S000001                               -
&&DSN2=\'\\VIA\\LIFE\\BS\\SD\\SD\\UnisureDevelopment\             ||  -
       \\\CONFIDENTIAL\                                           ||  -
       \\\JNR_TK123456_120528121854_R1234.csv'\                         
&&MVSDSN=NUZ1D.PUNDG061.JNR.ORI.S000002                               -
&&DSN2=\'\\VIA\\LIFE\\BS\\SD\\SD\\UnisureDevelopment\             ||  -
       \\\CONFIDENTIAL\                                           ||  -
       \\\JNR_TK234567_120528121854_R2345.csv'\                         
&&MVSDSN=NUZ1D.PUNDG061.JNR.ORI.S000003                               -
&&DSN2=\'\\VIA\\LIFE\\BS\\SD\\SD\\UnisureDevelopment\             ||  -
       \\\CONFIDENTIAL\                                           ||  -
       \\\JNR_TK345678_120528121854_R3456.csv'\                         
&&MVSDSN=NUZ1D.PUNDG061.JNR.ORI.S000004                               -
&&DSN2=\'\\VIA\\LIFE\\BS\\SD\\SD\\UnisureDevelopment\             ||  -
       \\\CONFIDENTIAL\                                           ||  -
       \\\JNR_TK456789_120528121854_R4567.csv'\                         
&&MVSDSN=NUZ1D.PUNDG061.JNR.ORI.S000005                               -
&&DSN2=\'\\VIA\\LIFE\\BS\\SD\\SD\\UnisureDevelopment\             ||  -   
\\\CONFIDENTIAL\                                                  ||  -      \\\JNR_TK567890_120528121854_R5678.csv'\     


Error returned is
SCBI003I
(Note that the cut&paste has not kept the allignment!)
Can anyone spot where this is wrong?
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue May 29, 2012 8:06 pm    Post subject:
Reply with quote

Hello,

Quote:
(Note that the cut&paste has not kept the allignment!)
Yup, this is the "way copy/paste works". To preserve alignment (and improve readdability) use the Code tag (your post has been "Code'd"), but i don't know if the alignment is correct . . .

Have you read about the SCBI003I? I don't "do" NDM (ConnectDirect), but i suspect the message is documented.
Back to top
View user's profile Send private message
David Casson

New User


Joined: 24 May 2012
Posts: 4
Location: United Kingdom

PostPosted: Tue May 29, 2012 8:23 pm    Post subject: Reply to: Multiple file transfer from Unix via mainframe to
Reply with quote

Looking at my previous post, most of the allignment is correct, but in the first line of the commands the final '-' should be level with the others and it does not seem to have wrapped the final 'confidential' line correctly. These all appear in alignment in my built commands. I have a sneaking suspicion that I may need to do the SUBMIT PROC for each of the seperate file commands!
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue May 29, 2012 8:37 pm    Post subject:
Reply with quote

Hopefully, i've gotten things back in alignment - if not just post a reply and we'll have another go.

When posting data, jcl, code, etc the Code tag uses a fixed font. Regular type uses a proportiaonal font so alignment is lost. Personally, i like the green on black of the Code'd text.

There is a Preview function so you can see your post as it will appear to the forum. When it appears as you wish, Submit.
Back to top
View user's profile Send private message
David Casson

New User


Joined: 24 May 2012
Posts: 4
Location: United Kingdom

PostPosted: Wed May 30, 2012 4:06 pm    Post subject: Reply to: Multiple file transfer from Unix via mainframe to
Reply with quote

Have finally sussed this! Have to build the entire Connect:Direct command stream into a dataset using ICETOOL. Then it is simply a case of including the dataset as a PARMSIN parameter when executing Connect:Direct

Code:
//CDSEND   EXEC CDSEND,PRIVPROC='NUTSO.CASSOND.DATA', 
//         PARMSIN='NUZ1D.PUNDG063.JNR.FILE1.CD'       
//*                                                   
//INTRDR   DD  SYSOUT=*                               
//NDMCMDS  DD  SYSOUT=*                               
//*                                                   
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed May 30, 2012 10:04 pm    Post subject: Reply to: Multiple file transfer from Unix via mainframe to
Reply with quote

Good to hear you have this working - thank you for posting the solution icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us