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

Need a help on SYNCSORT job


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Tue Mar 28, 2006 10:26 pm
Reply with quote

Hi All,

I need your valuable suggestion for the situation mentioned below.

There are two input files as shown below.

Input File 1: 20040328XXXXXXXXXX

Input File 2: Contains 5 lines, in that I just want to have the date i.e. 20040328 (from the Input File 1) to be overlaid on the 4th line of the
Input File 2 at the position 15 ? 22 to get the Single Output File.

Though it can be done by a work around involving more than one SYNCSORT step, Can this be done using a single SYNCSORT step?

Can anyone help me with any type of sort?

Thanks in advance.
Shri
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Wed Mar 29, 2006 4:14 am
Reply with quote

Do you have any key fields to identify the 4th line?? Also, is it always the last but one line?
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: Wed Mar 29, 2006 11:09 pm
Reply with quote

Shri asked me offline how to do this with DFSORT. In case anybody else is interested, here's the DFSORT job I offered:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file1 (FB/80)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
* Create DFSORT symbol:
* mydate,'yyyymmdd'
  OUTREC BUILD=(C'mydate,''',1,8,C'''',80:X)
/*
//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=... input file2 (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
* Add seqnum in 81-82.
* If seqnum is 4, overlay 15-22 with mydate.
* Remove seqnum.
  INREC IFOUTLEN=80,
        IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,2,ZD)),
        IFTHEN=(WHEN=(81,2,ZD,EQ,+4),OVERLAY=(15:mydate))
/*
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 Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top