Replacing PS name with new name



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Replacing PS name with new name

Postby vamsyk9 » Mon Feb 13, 2012 7:59 pm

Hi,

I am trying sort using joins to do the below scenario, but it is not giving of what i am expecting
File1

//GO.A DD DSN=NAME1.ORIGNAL,DISP=OLD
//GO.B DD DSN=XXX.NAME.G0403V00,DISP=SHR, \* need to change to new GDG
// DCB=BUFNO=32,UNIT=3490,
// XXX.NAME \*need to change with vol
//So on .. similar steps for all the files
File2
DISP=SHR,DSN=XXX.NAME.G0404V00 VOL=SER=(666666)
DISP=SHR,DSN=XXX.NAME1.G0407V00 VOL=SER=(666667,666665)
DISP=SHR,DSN=XXX.NAME2.G0403V00 VOL=SER=(666662)
DISP=SHR,DSN=XXX.NAME3.G0402V00 VOL=SER=(666661)

Output File should contain

//GO.A DD DSN=NAME1.ORIGNAL,DISP=OLD \* No change
//GO.B DD DSN=XXX.NAME.G0404V00,DISP=SHR, \*New file to be replaced
// DCB=BUFNO=32,UNIT=3490, \* no change
// VOL=SER=(666666) \*Need to replace the file name with vol as mentioned*
Any idea, which one can be better to do it.
vamsyk9
 
Posts: 24
Joined: Mon Nov 28, 2011 7:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Replacing PS name with new name

Postby NicC » Mon Feb 13, 2012 8:01 pm

You stil have not posted the code that you have tried or what your wrong output was.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Replacing PS name with new name

Postby vamsyk9 » Mon Feb 13, 2012 8:07 pm

OPTION COPY
JOINKEYS FILE=F1,FIELDS=(21,24) \*File1 name comparision
JOINKEYS FILE=F2,FIELDS=(14,24) \*File 2 name comparison
REFORMAT FIELDS=(F1:1,80)
JOIN UNPAIRED,F1,ONLY

Getting only one line output as below
\\GO.A DD DSN=NAME1.ORIGNAL,DISP=OLD
\\ only first steps of the file1 are displaying .Can you please help
vamsyk9
 
Posts: 24
Joined: Mon Nov 28, 2011 7:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Replacing PS name with new name

Postby BillyBoyo » Mon Feb 13, 2012 8:18 pm

I think you are a little way off in trying to use Joinkeys like that for this. Joinkeys will process two files, with keys of the same length. The keys can be in different positions on the two files, but must be in the same position within each file. I don't think you have that with your data

If you can describe exactly what you are trying to do, with complete (ie covering all possibilities) input data and expected output, I'm sure you'll be able to get some good advice.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Replacing PS name with new name

Postby vamsyk9 » Mon Feb 13, 2012 8:26 pm

Files are having the key value as mentioned below.

"The keys can be in different positions on the two files, but must be in the same position within each file"

I am creating a job which will automatically pick the latest generation from file2 and override file1 with new generation giving to output file as mentioned above..
vamsyk9
 
Posts: 24
Joined: Mon Nov 28, 2011 7:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Replacing PS name with new name

Postby vamsyk9 » Mon Feb 13, 2012 9:37 pm

Can somebody help on the above pls..
vamsyk9
 
Posts: 24
Joined: Mon Nov 28, 2011 7:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Replacing PS name with new name

Postby NicC » Tue Feb 14, 2012 12:53 am

As previoously mentioned elsewhere - why not just use generation (0) and do away with this file matching and trying to update?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Replacing PS name with new name

Postby enrico-sorichetti » Tue Feb 14, 2012 1:02 am

please reply to the question asked here
jcl/topic7148.html#p32037
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

Re: Replacing PS name with new name

Postby Frank Yaeger » Tue Feb 14, 2012 2:45 am

Can somebody help on the above pls..


I doubt it because you haven't clearly explained what you're trying to do, the "rules" for doing it, or the variations you have to deal with. We can't read your mind.

If you would take the time and effort to clearly explain everything, with examples of input and expected output for all the cases to be handled, then we might be able to help.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Replacing PS name with new name

Postby enrico-sorichetti » Tue Feb 14, 2012 3:17 am

Hallo Frank!
my understanding is that the TS is trying to keep up to date some jcl which uses absolute GDG names
but apart the technical DFSORT problem of updating the JCL
looks like in the TS organization there is a poor understanding of how GDG should be used
note also the horrible use of VOL=SER clause for a GDG, brrrr... ;)
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 DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post