SPlit with sort or icetool



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

SPlit with sort or icetool

Postby vamsyk9 » Fri Feb 10, 2012 8:11 pm

I have data as below in ps file

DSN=XXX.NAME,VOLS=322220,323446,
DSN=XXX.NAME1,VOLS=378756,TOTALBLOCKS=374
ETC..
I want to create out put as below , I am not getting logic to show the output as below into PS file

//GO.STEP DD DSN=XXX.NAME,DISP=SHR,
// DCB=BUFNO=AA,UNIT=DASD0,
// VOL=SER=(322220,323446)

Can this be possible to do with sort or icetool...
vamsyk9
 
Posts: 24
Joined: Mon Nov 28, 2011 7:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SPlit

Postby Frank Yaeger » Fri Feb 10, 2012 11:34 pm

Your description of what you want to do is extremely unclear!

I really have no idea what you're trying to do so all I can do is throw out a few guesses.
If you want help, you need to explain clearly what you want to do.

You used "SPLIT" as your Subject, but I don't see anything about splitting files in your description.

You mention two existing files and an output file, but you haven't made it clear what you want to do with those files.

DSN=XXX.NAME,VOLS=322220,323446,
DSN=XXX.NAME1,VOLS=378756,TOTALBLOCKS=374


Do you want to create DD statements from the records in an input data set that has their dsnames and attributes?

Do you just want to concatenate/copy XXX.NAME and XXX.NAME1 to XXX.NAME?

Please explain clearly and in detail what you want to do.
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: SPlit with sort or icetool

Postby vamsyk9 » Mon Feb 13, 2012 2:31 pm

Hi,

I want to break the the string DSN=XXX.NAME1,VOLS=378756,TOTALBLOCKS=374 into DSN= XXX.NAME1, VOLS=378756 Dont want TOTALBLOCKS at all..
vamsyk9
 
Posts: 24
Joined: Mon Nov 28, 2011 7:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SPlit with sort or icetool

Postby BillyBoyo » Mon Feb 13, 2012 3:07 pm

You can try the following. Are DSN= and VOLS= the only pssibilities for these values (so not DSNAME for instance)?

//DSNVOLS  EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
                                                             
  OPTION COPY
                                                             
  INREC PARSE=(%1=(STARTAT=C'DSN=',ENDBEFR=C',',FIXLEN=48),
               %2=(STARTAT=C'VOLS',ENDBEFR=C',',FIXLEN=10)),
               BUILD=(%1,X,%2)
//SORTIN DD *
DSN=XXX.NAME1,VOLS=378756,TOTALBLOCKS=374


Output:
DSN=XXX.NAME1                                    VOLS=378756
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SPlit with sort or icetool

Postby vamsyk9 » Mon Feb 13, 2012 3:23 pm

Thanks a lot... It worked fine....
vamsyk9
 
Posts: 24
Joined: Mon Nov 28, 2011 7:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SPlit with sort or icetool

Postby BillyBoyo » Mon Feb 13, 2012 3:34 pm

OK, thanks for letting us know.

You're not answering any of our questions :-) If you are happy with this as a starting-point, then fine. It won't work where there are multipls numbers after VOLS, for instance. If you get stuck, you can always come back, but we'd need to know the full requirement, with input and output samples, at one shot if possible. Good luck.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post