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
 

 

Need a help on SYNCSORT job

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

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Tue Mar 28, 2006 10:26 pm    Post subject: Need a help on SYNCSORT job
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    Post subject:
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 Moderator


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

PostPosted: Wed Mar 29, 2006 11:09 pm    Post subject:
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    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 Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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