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

If there is a match i need to write the details to output


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Fri Feb 26, 2010 3:05 am
Reply with quote

Hi All,

I have a file with emp id's only (14bytes) and i have to look up in another employee detail file in which the first 14 bytes is emp id. if there is a match i need to write the details (employee details) to output.

Can this be done thru DFSORT.
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: Fri Feb 26, 2010 3:10 am
Reply with quote

Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.

Also, please run this DFSORT job and show the //SYSOUT messages so I can see what level you're at:

Code:

//S1    EXEC  PGM=SORT         
//SYSOUT    DD  SYSOUT=*       
//SORTIN DD *                   
RECORD                         
//SORTOUT DD DUMMY             
//SYSIN    DD    *             
  OPTION COPY                   
/*                             
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Fri Feb 26, 2010 3:14 am
Reply with quote

Code:

File A:
12345678912345
21456987456321


File B:
12548963214587 Santo Cobol
12345678912345 Frank DFSORT
25874698512365 Guru  JCL
21456987456321 Edgar JCL

Output should be:
12345678912345 Frank DFSORT
21456987456321 Edgar JCL
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Fri Feb 26, 2010 3:20 am
Reply with quote

SYNCSORT FOR Z/OS 1.3.2.1R
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: Fri Feb 26, 2010 3:27 am
Reply with quote

Quote:
Can this be done thru DFSORT.


Quote:
SYNCSORT FOR Z/OS 1.3.2.1R



Sigh. If you have Syncsort, why are you posting in the DFSORT Forum and asking for a DFSORT solution?

I'm moving this thread to to the JCL Forum.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Feb 26, 2010 3:36 am
Reply with quote

How much longer do I have to do this? My neck is starting to hurt and a seagull just crapped on my forehead.... icon_lol.gif

Bill
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Feb 26, 2010 3:58 am
Reply with quote

Hi,

try this
Code:
//STEP0001 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTOUT  DD SYSOUT=*                                         
//SORTJNF1 DD *                                                 
12345678912345                                                 
21456987456321                                                 
//SORTJNF2 DD *                                                 
12548963214587 SANTO COBOL                                     
12345678912345 FRANK DFSORT                                     
25874698512365 GURU  JCL                                       
21456987456321 EDGAR JCL                                       
//SYSIN    DD *                                                 
   JOINKEYS FILE=F1,FIELDS=(1,14,A)                             
   JOINKEYS FILE=F2,FIELDS=(1,14,A)                             
   REFORMAT FIELDS=(F2:1,80)                                   
   SORT FIELDS=COPY                                             
/*                                                             



Gerry
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: Fri Feb 26, 2010 4:14 am
Reply with quote

Quote:
How much longer do I have to do this? My neck is starting to hurt and a seagull just crapped on my forehead....


Three more hours, but you can go inside to avoid the seagulls. icon_lol.gif'

Reminds me of the old joke about "Donald, duck".
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Fri Feb 26, 2010 5:18 am
Reply with quote

Thank you Gerry for your help.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Feb 26, 2010 6:49 am
Reply with quote

Arvind,
Please try to pick a more meaningful Subject next time.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
Search our Forums:

Back to Top