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 Syncsort output from overlapping Columns

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

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Mon Apr 19, 2010 2:15 pm    Post subject: Need Syncsort output from overlapping Columns
Reply with quote

Hi,

I am trying to get O/p mention in below format thru sort.

Input file is in the following format:

Input file: (FB)

LLLL01mm-dd-yyyyAAAAAAPPPPP
DDDDDDDDDDDDDDDDDDDDDDDDDD
KKKKKKKKKKKKKKKKKKKKKKKKKK
MMMMMMMMMMMMMMMMMMMMM
LLLL02mm-dd-yyyyBBBBBBVVVVV

Desired output should be like this(VBA)

Header
mm-dd-yyyy PPPPP VVVVV
Trailer

I used the below sort

SORT FIELDS=COPY
INCLUDE COND=(5,6,CH,EQ,C' LLLL01',OR,
5,6,CH,EQ,C' LLLL02')
OUTREC FIELDS=(1,4,5:7,10,15:23,6,25:43,6)

I get a OUTREC ‘HAS OVERLAPPING COLUMNS SPECIFIED’.Can someone suggest me how to get the desired output.

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

daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 662
Location: Pennsylvania

PostPosted: Mon Apr 19, 2010 7:25 pm    Post subject:
Reply with quote

It seems to me that this syntax is incorrect:

Quote:

OUTREC FIELDS=(1,4,5:7,10,15:23,6,25:43,6)


you have 5: and 15: and 25: but the 1,4 is missing something?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Mon Apr 19, 2010 7:43 pm    Post subject:
Reply with quote

daveporcelan

This is not a syntax issue. 1,4 copies first 4 bytes of the input record. If you don't specify position Sort automatically starts building record from the last copied byte which in this case will be first byte because its initial position.

VVRAVINDRA
Your include condition position is wrong. LLLL01 and LLLL02 starts at 1st byte and you mentioned your input file is FB so you would need to check for first 6 bytes. I ran the same control card with 1,6,CH include condition and it ran successfully.


Code:
INCLUDE COND=(1,6,CH,EQ,C'LLLL01',OR,
              1,6,CH,EQ,C'LLLL02')



However, Unless the control card you had mentioned is partial snapshot from the entire picture, its not going to give you desired results.

You would need to use SUBSET and SPLICE in order to achieve the desired output.


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

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Apr 19, 2010 10:06 pm    Post subject:
Reply with quote

only two records will be there with mentioned include condtion?
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


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