Ucopy using JCL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Ucopy using JCL

Postby mahendrai » Tue Sep 17, 2013 11:41 pm

Hi All - Need help in ucopy

i am doing the ucopy jcl.. that is copying file from source to destination..

In the source location at each 1hr i will be getting one txt file that is for eg : txtFile.txt.. i need to copy txtFile.txt from source location and rename as txtFile_01_Date.txt to destination location.. again after 1hr i will be getting another txtFile.txt in source location which need to be copied to destination location as txtFile_02_Date.txt.. in the same day i will be getting 5 txt will the same name in source location which i need to copy to destination location with txtFile_01_Date.txt, txtFile_02_Date.txt so on.. please help me in JCL for above condition.
mahendrai
 
Posts: 4
Joined: Tue Sep 17, 2013 11:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Ucopy using JCL

Postby Akatsukami » Tue Sep 17, 2013 11:46 pm

It is unlikely that you will find meaningful assistance with what is basically a *nix issue on a z/OS board.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Ucopy using JCL

Postby Robert Sample » Wed Sep 18, 2013 12:16 am

It is not clear what you are referring to -- do you mean the UUCP program in Unix, or is there some site-specific JCL that you are using called UCOPY? If the latter, you would be best going to someone working at your site for help as we are not likely to be familiar with the program.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Ucopy using JCL

Postby mahendrai » Wed Sep 18, 2013 12:27 am

I need to copy similar .txt file from source location to destination location and rename the copied file..

Eg : SourceLocation/Customer.txt to DestinationLocation/Customer_01_18092013.txt

After 1hr i will be getting another Customer.txt in the same SourceLocation which need to be copied to destination location again
Eg : SourceLoation/Customer.txt to DestinationLocation/Customer_02_18092013.txt

Since In coming file Customer.txt is not fixed, depending on customer.txt coming per day in the source location we need to copy to destination location with _01_date.txt, _02_date.txt so on..
mahendrai
 
Posts: 4
Joined: Tue Sep 17, 2013 11:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Ucopy using JCL

Postby Robert Sample » Wed Sep 18, 2013 1:26 am

Your explanation is as clear as mud. When you say
Eg : SourceLocation/Customer.txt to DestinationLocation/Customer_01_18092013.txt
are SourceLocation and DestinationLocation on the same computer or different computers? Is SourceLocation or DestinationLocation a z/OS machine?
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Ucopy using JCL

Postby mahendrai » Wed Sep 18, 2013 1:42 am

Source Location is one server and DestinationLocation is other server...Copying the file from one server to other server...
mahendrai
 
Posts: 4
Joined: Tue Sep 17, 2013 11:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Ucopy using JCL

Postby dick scherrer » Wed Sep 18, 2013 2:45 am

Hello,

Neither here nor in your same topic on another forum have you provided anythng we can use to help you . . .

As was mentioned "there" your dataset names are not valid for z/OS so first you need to explain how this might work with JCL.

I'm sure you believe your request is quite clear. And it is. Bur Only to you. For us to help, we also must understand exactly what you have and what you want to do with it . . .

Show some mainframe JCL that already uses one of these files successfully.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Ucopy using JCL

Postby Robert Sample » Wed Sep 18, 2013 4:03 am

You are bound and determined NOT to get any help, aren't you? Your answers are vague and non-specific even when asked specific questions -- if you cannot FULLY and ACCURATELY answer ALL of the questions below, this topic will be locked:

1. When you say "file", on a z/OS system that can refer to a sequential, partitioned, VSAM sequential, VSAM indexed, VSAM relative record, VSAM LDS, or Unix file. Which of these do you mean when you say "file"?

2. When you say "server", are you referring to a z/OS LPAR or a Windows server or a Unix server or a Linux server or something else you have not described?

3. For question 2, which type is the SourceLocation and which type is the DestinationLocation?

4. When you want to copy from server to server, are you planning on using REXEC or FTP or sFTP or something else you have not described?

5. You say you are "doing the ucopy JCL" -- post this JCL so we can see it. Use the Code button to preserve spacing.

6. How are you planning on keeping track of the number of files transferred since you will need to know that to generate the next file name?

7. When you say "txt" file, are you referring to a Windows / Unix ASCII text file? Are you aware that transferring this file to a z/OS system will change it to EBCDIC? Are you aware that changing an ASCII file to EBCDIC (or vice versa) will destroy any binary / packed decimal values in the file?

8. Is the file pure text or are there any language-specific symbols in it -- if so, what is the code page for the file? Is the file UTF-8 or Unicode?

Remember -- you have ONE chance to answer, in as much detail as you can, ALL of these questions, not just the numbered starting questions. If you fail to do so in your next post, this topic will be locked.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Ucopy using JCL

Postby mahendrai » Wed Sep 18, 2013 12:37 pm

some thing like this

/UCMDOPT DD DSN=IC.D2C.UCMDOPT.FILE(UNV00001),DISP=SHR
//SYSIN DD *
-host
-userid
-x
-script SCRIPT
/*

//STEP01 EXEC P2CUCPY,COND=(0,NE)
//UNVOUT DD DSN=&&UCMDF01,DISP=(,PASS,DELETE),
// DCB=(SRCDSCB,BLKSIZE=0),
// SPACE=(CYL,(3300,300),RLSE)
//UCMDOPT DD DSN=IC.D2C.UCMDOPT.FILE(UNV00001),DISP=SHR
//SYSIN DD *
-cmd 'ucopy 'D:\JCL\Customer.txt'
-host
-userid
-x
-stdout -mode binary
/*

//STEP02 EXEC P2CUCPY,COND=(0,NE)
//UNVIN DD DISP=OLD,DSN=&&UCMDF01
//UCMDOPT DD DSN=IC.D2C.UCMDOPT.FILE(UNV00001),DISP=SHR
//SYSIN DD *
set H=%time:~0,2%
set M=%time:~3,2%
set S=%time:~6,2%
if %H% lss 10 (set H=0%time:~1,1%)
if %H% geq 10 (set H=%time:~0,2%)
ren Customer.txt ¬
Customer_%date:~10%%date:~4,2%%date:~7,2%_%H%%M%%S%.txt
-cmd 'ucopy > D:\FormatJCL\'
-stdin -mode binary
-host
-userid
-x

IF Customer_%date:~10%%date:~4,2%%date:~7,2%_%H%%M%%S%.txt Then
ren Customer_%date:~10%%date:~4,2%%date:~7,2%_%H%%M%%S%.txt ¬
Customer_01_%date:~10%%date:~4,2%%date:~7,2%_%H%%M%%S%.txt
ELSE
MAIL Notification
mahendrai
 
Posts: 4
Joined: Tue Sep 17, 2013 11:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Ucopy using JCL

Postby enrico-sorichetti » Wed Sep 18, 2013 1:11 pm

if You will not learn to post any useful info
I doubt You will get any useful answer, nor here nor in any other forum,

see here for a comment on a similar subject ( p2cucpy)
all-other-mainframe-topics/topic6780.html

anyway I did some research and looks like the product being discussed is from
http://www.stonebranch.com/" onclick="window.open(this.href);return false;

as per
http://www.stonebranch.com/images/techn ... amples.doc" onclick="window.open(this.href);return false;

a moderator delete the link if improper
( since it points to the vendor site the link seems legal)

anyway I wonder how the zOS jcl is going to be triggered :shock:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post