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

SYNC SORT help needed


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1208
Location: Bangalore,India

PostPosted: Thu Nov 22, 2007 9:11 pm
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: 1702
Location: Australia

PostPosted: Fri Nov 23, 2007 6:44 am
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: 1287
Location: Chennai, India

PostPosted: Fri Nov 23, 2007 8:22 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top