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
 
syncsort extract and overlay

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: syncsort extract and overlay
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

Site Director


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

PostPosted: Tue Jun 29, 2010 11:41 pm    Post subject:
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    Post subject: Reply to: syncsort extract and overlay
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

Site Director


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

PostPosted: Tue Jun 29, 2010 11:54 pm    Post subject:
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    Post subject: Reply to: syncsort extract and overlay
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

Site Director


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

PostPosted: Wed Jun 30, 2010 12:49 am    Post subject:
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: 500
Location: USA

PostPosted: Tue Jul 06, 2010 8:20 pm    Post subject:
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    Post subject:
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    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 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. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm

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