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

syncsort extract and overlay


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

New User


Joined: 16 Mar 2009
Posts: 55
Location: India

PostPosted: Tue Jun 29, 2010 11:37 pm
Reply with quote

Hi,

I need to extract a column (date = 9999-12-31) from a flat file and need to check one more column value if it is AB then I need to write column 1 ( from 1 to 7 ) and 00 in ( 8 to 9) in syncsort.
I got the value by writing a separate sort to extract to 9999-12-31 and then i did build. How to do that in one single sort.

Thanks,
Venkat
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jun 29, 2010 11:41 pm
Reply with quote

Hello,

Post what you have and someone should be able to show how to combine them.
Back to top
View user's profile Send private message
venkatatcts

New User


Joined: 16 Mar 2009
Posts: 55
Location: India

PostPosted: Tue Jun 29, 2010 11:47 pm
Reply with quote

Hi,

first sort
Using INREC ( Date is extracted (9999-12-31) , column1 value = AB )
outrec ( 1,7 and building 00)
second sort
Using inrec (Date is extracted (9999-12-31) , column1 value <> AB)
outrec ( 1,7 and building 01)
Merge the two output file.

How to do this in one sort. I don't have mainframe access
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jun 29, 2010 11:54 pm
Reply with quote

Hello,

Post the actual jcl and control statements you used. . .
Back to top
View user's profile Send private message
venkatatcts

New User


Joined: 16 Mar 2009
Posts: 55
Location: India

PostPosted: Wed Jun 30, 2010 12:03 am
Reply with quote

I cannot copy the jcl as it is remote desktop. Please help
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 30, 2010 12:49 am
Reply with quote

Hello,

I suspect you are working in a Windows envirpnment. If you can enter the "stuff" on your 3270 terminal and work with it, you can copy/paste it here. . .

I don't know "remote desktop". . . icon_confused.gif

If you needed to send this in an e-mail to a co-worker, you would do the same sort of thing. . .
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Jul 06, 2010 8:20 pm
Reply with quote

Here is a sample job that should help you code your sort step. You will obviously need to change the field positions based on your actual data.
Code:
//STEP1 EXEC PGM=SORT                                   
//SORTIN  DD *                                           
AB12345XXXXXXXXXXXX9999-12-31                           
CD23456XXXXXXXXXXXX2010-12-31                           
AB34567XXXXXXXXXXXX2010-01-15                           
EF45678XXXXXXXXXXXX2010-05-01                           
AB56789XXXXXXXXXXXX9999-12-31                           
GH67890XXXXXXXXXXXX9999-12-31                           
//SORTOUT DD SYSOUT=*                                   
//SYSOUT  DD SYSOUT=*                                   
//SYSIN   DD *                                           
 INCLUDE COND=(20,10,CH,EQ,C'9999-12-31')               
 INREC IFTHEN=(WHEN=(1,2,CH,EQ,C'AB'),BUILD=(1,7,C'00')),
       IFTHEN=(WHEN=NONE,BUILD=(1,7,C'01'))             
 SORT FIELDS=COPY                                       
/*               


Here is the output produced from the above sort step:
Code:
AB1234500
AB5678900
GH6789001

If you have any further questions, please let us know.

Regards,
Back to top
View user's profile Send private message
venkatatcts

New User


Joined: 16 Mar 2009
Posts: 55
Location: India

PostPosted: Tue Jul 06, 2010 11:46 pm
Reply with quote

it works.thanks
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 Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts optim extract file - SAS DB2 2
No new posts How to extract the data for current y... DFSORT/ICETOOL 8
Search our Forums:

Back to Top