IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL to copy dynaicall named input file to mainframe file


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Aug 14, 2008 3:24 pm
Reply with quote

I have a file with name TXMMDDYY in EBCDIC format. It is being sftp'd through a Java process to Unix Services system. Now I need to run a job after copying TXMMDDYY in EBCDIC format to mainframe file.

The problem is the name of the file in EBCDIC format is dynamic.i.e., it has date in the file name. So everytime I run the Job i need to modify the file in EBCDIC format. But the requirement is to automate the process of copying the file and then running job.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 14, 2008 3:38 pm
Reply with quote

remove the date from the file name
Back to top
View user's profile Send private message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Aug 14, 2008 4:21 pm
Reply with quote

We cannot remove the date from the file name, because it is a requirement of JAVA people to generate a EBCDIC file with date in the file name.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Aug 14, 2008 4:26 pm
Reply with quote

if You described the process a bit better somebody might come up with a solution
please describe the overall requirement for the date construct in the file name

do You need to carry it on also on the mvs side of data management ?

if it can be dropped, somebody enforced a useless requirement
let the JAVA people build the local name in any format they want
require that the file be ftp'ed in according to the mainframe requirements
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Aug 14, 2008 4:57 pm
Reply with quote

I'll admit I don't know much about USS, but can't you use the LIST command in a shell, with the results piped to STDOUT which could point to an MVS dataset? Then, all you'd have to do is read the STDOUT dataset to get the dynamic filename and generate the proper code to perform the copy?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 14, 2008 5:07 pm
Reply with quote

I don't think ls output can be piped straight to an MVS dataset. However, this code has been tested using batch TSO:
Code:
  oshell ls -al /u/tech/ttssrs0 >/u/tech/ttssrs0/ls.output
  oget 'ls.output' 'TTSSRS0.LS.OUTPUT'
The path has to be fully qualified since batch TSO doesn't set the environment. Dataset TTSSRS0.LS.OUTPUT can then be searched for the particular file name(s) required.
Back to top
View user's profile Send private message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Aug 14, 2008 5:25 pm
Reply with quote

The file in EBCDIC format is sent by java people through sftp process. The file is sftp'ed from Java server to Unix Services System with the name TXMMDDYY.EBCDIC. MMDDYY stands for the date on which the file is sftp'ed.

My requirement is to get a file in EBCDIC format with dynamic file name to mainframe file through FTP process.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 14, 2008 5:40 pm
Reply with quote

Mairaj: your requirements are not clear. Putting the file on Unix Systems Services puts the file on the mainframe. It is there, in EBCDIC -- at least as long as your FTP job used binary transfer.

The dynamic file name doesn't matter since you don't discuss using any batch JCL or other process that would require the file name. Unless you've got requirements you haven't listed, you have what you want.
Back to top
View user's profile Send private message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Aug 14, 2008 5:59 pm
Reply with quote

Ok then how can i view the file in MVS system. WHen am trying to read the file name with TXMMDDYY.EBCDIC format, it is giving me No dataset found.

Data Set List Utility No data set names found
Option ===>
More: +
blank Display data set list P Print data set list
V Display VTOC information PV Print VTOC information

Enter one or both of the parameters below:
Dsname Level . . . TX*.EBCDIC
Volume serial . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 14, 2008 6:07 pm
Reply with quote

Which version of z/OS you running? I know on 1.8 and later you have access to option 3.17 of ISPF; I'm not sure if it came in with 1.7 or not. But you do not want 3.4 -- 3.17 lists Unix System Services files.
Back to top
View user's profile Send private message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Aug 14, 2008 6:10 pm
Reply with quote

it is 1.2 version
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 14, 2008 6:17 pm
Reply with quote

You can use OGET command to pull the file from Unix System Services to an MVS file name, or you can use telnet to access the Unix System Services directly to look at the file, or you can try OEIS or OMVS to access the Unix System Services file systems. Using telnet will require talking to a systems programmer on your system to find out what port is assigned to the Unix System Services access; frequently 623 or 1023 are used but there's no requirement for one of them -- it could 63137 if the systems programmer felt like it.
Back to top
View user's profile Send private message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Aug 14, 2008 6:38 pm
Reply with quote

thank you. Can you please let me know on option 3.17 of ISPF.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top