Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
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
 
SORT to mutiple outputs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
autobox

New User


Joined: 19 Aug 2005
Posts: 48

PostPosted: Sat Jul 18, 2009 8:32 am    Post subject: SORT to mutiple outputs
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: 1703
Location: Australia

PostPosted: Sat Jul 18, 2009 2:53 pm    Post subject:
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: 48

PostPosted: Sun Jul 19, 2009 9:32 am    Post subject: Reply to: SORT to mutiple outputs
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Sun Jul 19, 2009 10:05 am    Post subject: Reply to: SORT to mutiple outputs
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

Site Director


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

PostPosted: Mon Jul 20, 2009 1:58 am    Post subject:
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: 48

PostPosted: Mon Jul 20, 2009 5:33 pm    Post subject: Reply to: SORT to mutiple outputs
Reply with quote

Hi Guys,

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

DFSORT Moderator


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

PostPosted: Mon Jul 20, 2009 9:46 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us