View previous topic :: View next topic
|
Author |
Message |
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
I have Mainframe GDG . at the end of the file I need to append .XFR and send to specific path file.
Please let us know what will be unix script for this to run in BPXBATCH
input : TEST.TEST1.G00V100
OUTPUT : TEST.TEST1.G00V100.XFR |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
at the end of the file I need to append .XFR |
Do you mean you need to append .XFR to the data set name? What you have written implies that you want a record wth the contents '.XFR' as the last record in the DATA SET. |
|
Back to top |
|
|
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
I need to append .XFR to the dataset name not at the end of the records.
is it possible in BPXBATCH Utility |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
If the GDG is created on the mainframe, why do you need to rename it with a UNIX process ?
Wouldn't a mainframe utility be the way to go ? |
|
Back to top |
|
|
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
At present we are using Micfro Focus Cobol . So all the Mainframes files will be generated with .DAT extension.
So I need to convert the .DAT conversion to .XFR extension and to be placed in Unix Server Path.
please let me how to do is with unix script So that i can run script with BPXBATCH utility |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you looked into this yourself ?
To rename a file using a UNIX command is easy enough, I googled it when I first needed to use it, so what is the problem.
Your explanation after some questions leads to a completely different scenario to that first given. PLEASE - do learn to give the full story from the outset as this can avoid problems later down the line.
From what I can now understand from your additional comments, the input would be TEST.TEST1.G00V100.DAT and this needs to end up as TEST.TEST1.G00V100.XFR, which is not your original description. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
I agree with expat, since you are looking for a batch job solution, why limit yourself to BPXBATCH? Other utilities like IEBGENER or ADRDSSU can copy datasets. If you need to locate the latest dataset then a REXX based solution would be my choice. |
|
Back to top |
|
|
|