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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: If there is a match i need to write the details to output
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 Moderator


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

PostPosted: Fri Feb 26, 2010 3:10 am    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

SYNCSORT FOR Z/OS 1.3.2.1R
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: Fri Feb 26, 2010 3:27 am    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Feb 26, 2010 3:36 am    Post subject: Reply to: Look up.
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: 1703
Location: Australia

PostPosted: Fri Feb 26, 2010 3:58 am    Post subject:
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 Moderator


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

PostPosted: Fri Feb 26, 2010 4:14 am    Post subject:
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    Post subject:
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: 1239
Location: Richfield, MN, USA

PostPosted: Fri Feb 26, 2010 6:49 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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