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 Usergroups Profile Log in to check your private messages Log in
 

 

How to get DEFAULT record from DF-SORT

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

New User


Joined: 17 Jan 2006
Posts: 17

PostPosted: Sat Apr 28, 2007 1:41 am    Post subject: How to get DEFAULT record from DF-SORT
Reply with quote

I have a file, all records in that file that contains Key field (5 bytes) & Data field, I would like to create a file with all the Key field = AAAAA , a file with all the Key field = BBBBB and if any key field is not equal AAAAA or BBBBB I wand to create a file with a default key field = XXXXX

EX: Input file

AAAAA vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
AAAAB VVVVVVVVVVVVVVVVVVVVVVVVVVVVxxxxx
AAAAA HHHHHHHHHHHHHHHHHHHHVVVVVVVVVVVVV
AAACD BBBBBBBBBBBBBBBBBBBBXXXXXXXXXXXXX
BADRC BBBBBBBBBBBBBBXXXXXXXXXXXXXXXXXXX
BBBBB NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
XXXXX TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
BBBBB VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Output in File-01
AAAAA vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
AAAAA HHHHHHHHHHHHHHHHHHHHVVVVVVVVVVVVV

Output in File-02
BBBBB NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
BBBBB VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Output in File-03
XXXXX VVVVVVVVVVVVVVVVVVVVVVVVVVVxxxxx
XXXXX BBBBBBBBBBBBBBBBBBBBXXXXXXXXXXXXX
XXXXX BBBBBBBBBBBBBBXXXXXXXXXXXXXXXXXXX
XXXXX TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

How can I use DF-SORT to get the 3 files like that ???
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: Sat Apr 28, 2007 2:39 am    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file1
//OUT3 DD DSN=...  output file1
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=OUT1,INCLUDE=(1,5,CH,EQ,C'AAAAA')
  OUTFIL FNAMES=OUT2,INCLUDE=(1,5,CH,EQ,C'BBBBB')
  OUTFIL FNAMES=OUT3,SAVE,OVERLAY=(1:C'XXXXX')
/*
Back to top
View user's profile Send private message
Huan-Nguyen

New User


Joined: 17 Jan 2006
Posts: 17

PostPosted: Sat Apr 28, 2007 2:47 am    Post subject:
Reply with quote

I very appreciate your expert help. Thank you very much & wishing you have a great week-end !
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 to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am


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