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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 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 SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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