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
 
Ezytrieve equal code in Syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Nov 04, 2009 7:00 pm    Post subject: Ezytrieve equal code in Syncsort
Reply with quote

Hi,

Please give me the equivalent code in Syncsort for below Ezytrieve code.

Details:

IN-KEY1 - Starting position 12, length 8 - from file1.
IN-ACCT2 - Starting position 307, length 8 - from file1.
IN-KEY2 - Starting position 50, length 8 - from file2.

Code:

JOB  INPUT NULL                                     
  GET INFILE1                                       
  GET INFILE2                                       
  DO WHILE NOT EOF INFILE1                           
       IF (IN-KEY1 = IN-KEY2) OR (IN-ACCT2 = IN-KEY2)
          GOTO JOB                                   
       ELSE                                         
           PUT OUTFILE FROM INFILE1                 
           GET INFILE1                               
       END-IF                                       
  END-DO                                             
  STOP                                               


Thanks.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 04, 2009 7:19 pm    Post subject:
Reply with quote

Perhaps for the non programmers amongst us, it may be beneficial to actually explain what the program will achieve.

Take a long long look at the information that you have given us. Not a lot there really, is there ? We only joke about being psychic, we're not really psychic much at all.

So, using my brain I have thought about what people might just need to know about the problem in hand.

1) What exactly it is that you want to achieve.
2) Examples of the the input records.
3) What is the expected output.
4) What are the RECFM and LRECL of the input files.
5) What is the RECFM and LRECL of any output files.
6) Where in each record layout is the compare / key fields.
7) How long are these fields.
8) What format do these fields use.
9) And most important of all, which sort product do you use, as the solution may vary from product to product, so why let someone waste time developing a solution for you which will not work because it is for the wrong product.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 04, 2009 9:10 pm    Post subject: Reply to: Ezytrieve equal code in Syncsort
Reply with quote

Hi Expat,

Not only do people want the forum to do their work for them, but now we've moved on to providing conversion service. . .

Not only "Give me", but now
Quote:
Please give me the equivalent code in Syncsort for below Ezytrieve code.


icon_rolleyes.gif
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Nov 04, 2009 9:25 pm    Post subject: Reply to: Ezytrieve equal code in Syncsort
Reply with quote

Hi,

Quote:

- The file1 LRECL is 400 and RECFM is FB. The file2 LRECL is 80 and RECFM is FB.
- Output LRECL is 80 and RECFM is FB.
- IN-KEY1 - Starting position 12, length 8 - from file1.
- IN-ACCT2 - Starting position 307, length 8 - from file1.
- IN-KEY2 - Starting position 50, length 8 - from file2.
- IN-KEY2 of file2 to be compared against IN-KEY1 and also IN-ACCT2 of file1 and unmatched value from file1 should be written to output file.
- The fields are character format.
- The product being used is Syncsort.


File1:
Code:

AC200200     BK509809
AC345789     TM444441


file2:
Code:

AC200200
AC345789
TM444441


Output:
Code:

BK509809


Thanks.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Nov 04, 2009 10:27 pm    Post subject:
Reply with quote

Here is an example that you can use to convert the Ezytrieve application to SyncSort for z/OS:
Code:
//S1     EXEC PGM=SORT                                     
//SORTJNF1 DD *                                           
AC200200     BK509809                                     
AC345789     TM444441                                     
//SORTJNF2 DD *                                           
AC200200                                                 
AC345789                                                 
TM444441                                                 
//SORTOUT  DD DSN=OUTPUT.FILE,DISP=(,CATLG) 
//SYSOUT   DD SYSOUT=*                                     
//SYSIN    DD *                                             
  JOINKEYS FILES=F1,FIELDS=(1,8,A)                       
  JOINKEYS FILES=F2,FIELDS=(1,8,A)                       
  JOIN UNPAIRED,F1,ONLY                                   
  REFORMAT FIELDS=(F1:1,8)                               
  SORT FIELDS=COPY
  OUTREC OVERLAY=(80:X)
/*                                     
//S2     EXEC PGM=SORT                     
//SORTJNF1 DD *                           
AC200200     BK509809                     
AC345789     TM444441                     
//SORTJNF2 DD *                           
AC200200                                 
AC345789                                 
TM444441                                 
//SORTOUT  DD DSN=OUTPUT.FILE,DISP=MOD
//SYSOUT   DD SYSOUT=*                     
//SYSIN    DD *                             
  JOINKEYS FILES=F1,FIELDS=(14,8,A)       
  JOINKEYS FILES=F2,FIELDS=(1,8,A)       
  JOIN UNPAIRED,F1,ONLY                   
  REFORMAT FIELDS=(F1:14,8)               
  SORT FIELDS=COPY
  OUTREC OVERLAY=(80:X)
/*                     
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Nov 05, 2009 3:36 pm    Post subject: Reply to: Ezytrieve equal code in Syncsort
Reply with quote

Thanks Alissa. I will try this and come back.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Nov 05, 2009 3:54 pm    Post subject: Thx
Reply with quote

Alissa, it is working as expected. Thanks once gain.
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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am

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