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
 

 

Transferring Multiple files to OMVS using SFTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Dec 22, 2009 3:45 pm    Post subject: Transferring Multiple files to OMVS using SFTP
Reply with quote

Dear Experts,

Below is my code,
I'm using to transfer multiple (2 files in this case) to OMVS using SFTP.
The job is executing successfully with MAXCC = 0
But When I login on OMVS, I'm able to see only first file not the second file.

ALLOCATE DDNAME(KPAYR) -
PATH('/u/users/USERID/USER.FILE1.txt') -
PATHDISP(KEEP,DELETE) PATHMODE(SIRWXU) -
PATHOPTS(OCREAT,OWRONLY)
OCOPY INDD(INDSN1) OUTDD(KPAYR) TEXT CONVERT((BPXFX311)) FROM1047
ALLOCATE DDNAME(KPAYR) -
PATH('/u/users/USERID/USER.FILE2.txt') -
PATHDISP(KEEP,DELETE) PATHMODE(SIRWXU) -
PATHOPTS(OCREAT,OWRONLY)
OCOPY INDD(INDSN2) OUTDD(KPAYR) TEXT CONVERT((BPXFX311)) FROM1047

Please help me with the correct code.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Tue Dec 22, 2009 4:45 pm    Post subject:
Reply with quote

I haven't tested anything, but unless there's stuff you haven't shown us you are not freeing KPAYR between the OCOPY statements. Without freeing the DDname, I don't think it'll be allocated to the second file so you should only be seeing the one file copied into the directory.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Dec 22, 2009 5:22 pm    Post subject: Transferring Multiple files to OMVS using SFTP
Reply with quote

Robert,

What additional commands are requiered between the two ALLOCATE commands to free the KPAYR ???
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Tue Dec 22, 2009 5:49 pm    Post subject:
Reply with quote

We're not using SFTP so I'm not sure of the command syntax. Why not change the second allocate to use DDNAME KPAYS and the OCOPY to go to KPAYS instead of KPAYR? Different DDNAME, end of problem.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Dec 22, 2009 6:15 pm    Post subject:
Reply with quote

Hi robert,
You are rocking.

I chaged the DDName and it's worked.
Myth: I felt DDName - KPAYR is pre-defined.

No, My job become easy.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Tue Dec 22, 2009 7:18 pm    Post subject:
Reply with quote

Glad to hear it worked. And I doubt something like KPAYR would be standardized -- INPUT, OUTPUT, SYSIN, SYSPRINT all make sense, but definitely not KPAYR!
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


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