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
 

 

SYNC SORT help needed

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

New User


Joined: 12 Dec 2005
Posts: 13

PostPosted: Thu Nov 22, 2007 8:06 pm    Post subject: SYNC SORT help needed
Reply with quote

Hi
Could you please help me in Sort problem.

I want to include single quote in output file. How I can do that?

for example:

My output file should contain: '2007-10-10'

Inthe input file the year value is :
----+----1----+----2----+----3----+----4---
20071121
----+----1----+----2----+----3----+----4---

My sort cord contains the below code:

OUTREC FIELDS=(C''',2:15,4,C'-',7:17,2,C'-',
11:19,2, C''')

IF i put C''', the single quote value is thoughing an error.

Please help me.

Thanks
VS Rao.
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Nov 22, 2007 9:11 pm    Post subject:
Reply with quote

Hi There,

Please find attached sort card If you want that job out put should be '2007-11-21'

Code:
OPTION COPY                                                 
OUTREC FIELDS=(1:X'7D',2:1,4,C'-',7:5,2,C'-',10:7,2,12:X'7D')
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Nov 23, 2007 6:44 am    Post subject: Reply to: SYNC SORT help needed
Reply with quote

Hi,
or you could use the following code although I'm a bit confused about the input and output data.

How does 20071121 become '2007-10-10' ?


Gerry

Code:
OPTION COPY                                                   
OUTREC FIELDS=(1:C'''',2:1,4,C'-',7:5,2,C'-',10:7,2,12:C'''')
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Nov 23, 2007 8:22 am    Post subject: Reply to: SYNC SORT help needed
Reply with quote

gcichet,

Quote:
How does 20071121 become '2007-10-10' ?


That should be a typo.
Back to top
View user's profile Send private message
vsrao_2k

New User


Joined: 12 Dec 2005
Posts: 13

PostPosted: Tue Nov 27, 2007 6:05 pm    Post subject: Reply to: SYNC SORT help needed
Reply with quote

Thank you so much for you help.

Now I can able to get the required output.

Thank, Thanks, 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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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