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
 
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: 2504
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: 1249
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am

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