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

SORT to mutiple outputs


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
autobox

New User


Joined: 19 Aug 2005
Posts: 51

PostPosted: Sat Jul 18, 2009 8:32 am
Reply with quote

Hi all,

I want to create several output DSs based on the content in an input DS by SORT, here is my code:

Code:
OPTION COPY                                       
OUTFIL FNAMES=OUTPUT1,OUTREC=(C'OUTPUT1',1,18,55X)
OUTFIL FNAMES=OUTPUT2,OUTREC=(C'OUTPUT2',1,18,55X)
OUTFIL FNAMES=OUTPUT3,OUTREC=(C'OUTPUT3',1,18,55X)


My expect results are:
OUTPUT DS OUTPUT1 contents: string 'OUTPUT1, col 1~18 from input DS and blanks'
OUTPUT DS OUTPUT2 contents: string 'OUTPUT2, col 1~18 from input DS and blanks'
OUTPUT DS OUTPUT3 contents: string 'OUTPUT3, col 1~18 from input DS and blanks'
But after job completed, I got string 'OUTPUT3, col 1~18 from input DS and blanks' in all 3 of the outputs. Please advise what happened here, or any other solutions. Thanks.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sat Jul 18, 2009 2:53 pm
Reply with quote

Hi,

please show job output including messages.

It works ok when I ran it.


Gerry
Back to top
View user's profile Send private message
autobox

New User


Joined: 19 Aug 2005
Posts: 51

PostPosted: Sun Jul 19, 2009 9:32 am
Reply with quote

Hi,

Please find below of the JCL and JOB LOG:

Code:
//STOUTFIL EXEC PGM=SORT                               
//SYSPRINT  DD  SYSOUT=*                               
//SYSOUT    DD  SYSOUT=*                               
//SORTIN    DD  DISP=SHR,DSN=USER.TEST.EXEC(INPUT)     
//OUTPUT1   DD  DISP=OLD,DSN=USER.TEST.PDS1(SORTOT01)
//OUTPUT2   DD  DISP=OLD,DSN=USER.TEST.PDS1(SORTOT02)
//OUTPUT3   DD  DISP=OLD,DSN=USER.TEST.PDS1(SORTOT03)
//SYSIN     DD  *                                       
 OPTION COPY                                           
 OUTFIL FNAMES=OUTPUT1,OUTREC=(C'OUTPUT1',1,18,55X)     
 OUTFIL FNAMES=OUTPUT2,OUTREC=(C'OUTPUT2',1,18,55X)     
 OUTFIL FNAMES=OUTPUT3,OUTREC=(C'OUTPUT3',1,18,55X)     
/*


Code:
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                                                     
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 08:51 ON SAT JUL 18, 2009 -                         
           OPTION COPY                                                                                             
           OUTFIL FNAMES=OUTPUT1,OUTREC=(C'OUTPUT1',1,18,55X)                                                       
           OUTFIL FNAMES=OUTPUT2,OUTREC=(C'OUTPUT2',1,18,55X)                                                       
           OUTFIL FNAMES=OUTPUT3,OUTREC=(C'OUTPUT3',1,18,55X)                                                       
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1                                                             
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED                                       
ICE088I 0 USERA.STOUTFIL.        , INPUT LRECL = 80, BLKSIZE = 27920, TYPE = FB                                 
ICE093I 0 MAIN STORAGE = (MAX,4194304,4194304)                                                                     
ICE156I 0 MAIN STORAGE ABOVE 16MB = (4136944,4136944)                                                               
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256       
ICE128I 0 OPTIONS: SIZE=4194304,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT               
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N             ,ABCODE=MSG
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB1             
ICE131I 0 OPTIONS: TMAXLIM=4194304,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0                             
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N       
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=2097152,SOLRF=Y,VLLONG=N,VSAMIO=N                           
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN                                                                       
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 35840, ABOVE 16M = 6261760                                         
ICE210I 0 OUTPUT1  : BSAM USED, LRECL = 80, BLKSIZE = 27920, TYPE = FB                                             
ICE210I 0 OUTPUT2  : BSAM USED, LRECL = 80, BLKSIZE = 27920, TYPE = FB                                             
ICE210I 0 OUTPUT3  : BSAM USED, LRECL = 80, BLKSIZE = 27920, TYPE = FB                                             
ICE055I 0 INSERT 0, DELETE 0                                                                                       
ICE054I 0 RECORDS - IN: 1, OUT: 1                                                                                   
ICE227I 0 OUTPUT1  : DELETED = 0, REPORT = 0, DATA = 1                                                             
ICE228I 0 OUTPUT1  : TOTAL IN = 1, TOTAL OUT = 1                                                                   
ICE227I 0 OUTPUT2  : DELETED = 0, REPORT = 0, DATA = 1                                                             
ICE228I 0 OUTPUT2  : TOTAL IN = 1, TOTAL OUT = 1                                                                   
ICE227I 0 OUTPUT3  : DELETED = 0, REPORT = 0, DATA = 1                                                             
ICE228I 0 OUTPUT3  : TOTAL IN = 1, TOTAL OUT = 1                                                                   
ICE751I 0 C5C6C7C8E9C9E5E7EFCBF0E8                                                                                 
ICE052I 0 END OF DFSORT                       
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Jul 19, 2009 10:05 am
Reply with quote

not a SORT issue !!
rather a misunderstanding of PDS data management

Code:
//OUTPUT1   DD  DISP=OLD,DSN=USER.TEST.PDS1(SORTOT01)
//OUTPUT2   DD  DISP=OLD,DSN=USER.TEST.PDS1(SORTOT02)
//OUTPUT3   DD  DISP=OLD,DSN=USER.TEST.PDS1(SORTOT03)


thats' a PDS restriction
opening in output at the same time more than one member as a PS will clobber the pds content
has been discussed a few times and is documented in the manual

.....
here is the reason why
to write a new PDS member data management needs to know where to start writing ( starting TTR of the member)
it takes this info from the VTOC
and it will write it into the PDS directory at STOW(close) time
and at close time it will update the VTOC also

opening at the same time more new members as PS means that the starting TTR will be the same for all the new members
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 20, 2009 1:58 am
Reply with quote

Hello,

And no, this is not a feature to exploit. . .
Back to top
View user's profile Send private message
autobox

New User


Joined: 19 Aug 2005
Posts: 51

PostPosted: Mon Jul 20, 2009 5:33 pm
Reply with quote

Hi Guys,

Got it. Thank you so much!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Jul 20, 2009 9:46 pm
Reply with quote

autobox,

Note that you can do what you want with PDSE members or different PS data sets.

And please don't post the same question on multiple help boards. I answered this question on the other help board.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top