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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm


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