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 Profile Log in to check your private messages Log in
 
Want to copy a PS file to another in JCL step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
saikat

New User


Joined: 23 Jun 2008
Posts: 26
Location: pune

PostPosted: Thu Sep 27, 2012 4:17 pm    Post subject: Want to copy a PS file to another in JCL step
Reply with quote

Hi,

I want to copy a PS file to another in JCL step.

But the second file where I want to copy file should have same filename as first filename except the first level qualifier to be different.

The first filename is not static , it gets changed with date and timestamp for each job submission.

So I want to strip off all qualifiers from first filename except first level qualifier and generate the second filename based on this with new hlq.

Please advise how to achieve this.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Sep 27, 2012 4:20 pm    Post subject: Reply to: JCL query
Reply with quote

Show how you do the first file name. Then explain why the second can't be done that way.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8151
Location: East Dubuque, Illinois, USA

PostPosted: Thu Sep 27, 2012 4:38 pm    Post subject:
Reply with quote

You achieve this in the standard way that has been described many, many, many times -- and after more than 4 years on this forum surely you have read that a few times.

Write a program in the language of your choice to create the JCL with the correct file names. Copy that JCL to the internal reader, either in your program or via a utility.
Back to top
View user's profile Send private message
saikat

New User


Joined: 23 Jun 2008
Posts: 26
Location: pune

PostPosted: Thu Sep 27, 2012 5:34 pm    Post subject:
Reply with quote

Is it possible to do via REXX??
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1775
Location: Bloomington, IL

PostPosted: Thu Sep 27, 2012 6:55 pm    Post subject:
Reply with quote

saikat wrote:
Is it possible to do via REXX??


Robert Sample wrote:
Write a program in the language of your choice to create the JCL with the correct file names. Copy that JCL to the internal reader, either in your program or via a utility.
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: Thu Sep 27, 2012 7:05 pm    Post subject:
Reply with quote

Hello,

Have you considered putting this job in a cataloged PROCedure and using symbolic parameter(s)?
Back to top
View user's profile Send private message
Juan Ramirez de Arellano

New User


Joined: 03 Oct 2012
Posts: 3
Location: Mexico

PostPosted: Mon Oct 08, 2012 4:04 pm    Post subject:
Reply with quote

saikat wrote:
Is it possible to do via REXX??


Hi! Yes, it is. I have done something similar via REXX years ago. Sadly after this years I haven't coded any REXX program again so I cannot be more helpful.

Good luck!
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 Oct 09, 2012 7:56 am    Post subject:
Reply with quote

Hello,

It is best to reply when you have a contribution to the topic.

Telling the poster you did something like this "once upon a time" but no longer have the code and do not remember exactly how is not very helpful.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1868
Location: UK

PostPosted: Tue Oct 09, 2012 12:18 pm    Post subject:
Reply with quote

However, it was a Yes/No question!
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 Oct 09, 2012 7:00 pm    Post subject:
Reply with quote

Hi Nic,

Robert had posted and Akatsukami repeated:

Quote:
Write a program in the language of your choice to create the JCL with the correct file names.
And as REXX is a language that many choose, this would be 2 "yes, it can's". . .
Back to top
View user's profile Send private message
ezio vin

New User


Joined: 16 Aug 2012
Posts: 44
Location: india

PostPosted: Wed Oct 10, 2012 3:55 pm    Post subject:
Reply with quote

hi,

i cant able to understand what you need exactly but here is the REXX code to change the first qualifier alone

Code:
ADDRESS ISREDIT                                 
"(JCLLINE) = LINE .ZCSR"                       
JCLLINE=STRIP(JCLLINE)                         
PARSE VAR JCLLINE DUMM 'DSN=' INDSN ',' BRR JUNK
SAY 'INPUT FILE:' INDSN                         
PARSE VAR INDSN VARA '.' OUTDSN',' BRR JUNK     
SAY 'OUTPUT FILE:' XXX.OUTDSN


Output
Code:
INPUT FILE: AAA.ABCD.AABBCCDD.S122.M11111
OUTPUT FILE: XXX.ABCD.AABBCCDD.S122.M11111
*** 
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Oct 18, 2012 12:12 pm    Post subject: Re: Want to copy a PS file to another in JCL step
Reply with quote

saikat wrote:
The first filename is not static , it gets changed with date and timestamp for each job submission.

So I want to strip off all qualifiers from first filename except first level qualifier and generate the second filename based on this with new hlq.
Using some utility-program with the capability of copy-opration and keeping the HLQs of input and output static should do what you say, no?

I'm late to the party and possibly I misunderstood.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Oct 18, 2012 4:01 pm    Post subject:
Reply with quote

Saikat..... You just asked question(which makes no sense) and got lost.... icon_eek.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

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