MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Formatting the record

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
oneofspace
Beginner


Joined: 18 Nov 2008
Posts: 33
Topics: 14

PostPosted: Fri Apr 17, 2009 4:58 am    Post subject: Formatting the record Reply with quote

Hi

I am having input file of record length 40, fixed block. It is having records as follows.

Code:
----+----1----+----2----+----3----+----4
1441AAAAAAAAAAAAAAAACOM1111AAAAAAAAAAAAA
1442BBBBCOM2222BBBBBBBBBBBBBBBBBBBBBBBBB
1443CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
1444DDDDDDDDDDDDDDDDDDDDDDCOM3333DDDDDDD
1445EEEEEEEEEEEEEEEEEEEEEEEEECOM5555EEEE


The string COMXXXX will appear at any point. It may not present in some records. I need to create output of record length 11 as follows.

Code:
----+----1-
1441COM1111
1442COM2222
1444COM3333
1445COM5555


I want the first 4 numbers and the string COMXXXX. Records not having the string COMXXXX have to be removed.
Is there any way to achieve this using SYNCSORT?

Thanks in advance.
One.
Back to top
View user's profile Send private message
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Mon Apr 20, 2009 2:16 pm    Post subject: Reply with quote

Try this SyncSort for z/OS 1.3 application:
Code:
//SORT   EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                 
//SORTOUT  DD SYSOUT=*                 
//SORTIN   DD *                         
1441AAAAAAAAAAAAAAAACOM1111AAAAAAAAAAAAA
1442BBBBCOM2222BBBBBBBBBBBBBBBBBBBBBBBBB
1443CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
1444DDDDDDDDDDDDDDDDDDDDDDCOM3333DDDDDDD
1445EEEEEEEEEEEEEEEEEEEEEEEEECOM5555EEEE
//SYSIN    DD *                     
  SORT FIELDS=COPY                   
  INREC PARSE=(%01=(FIXLEN=4),       
               %02=(STARTAT=C'COM',FIXLEN=7)),   
        BUILD=(%01,%02)                   
  OUTFIL INCLUDE=(5,3,CH,EQ,C'COM')
/*     

_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
oneofspace
Beginner


Joined: 18 Nov 2008
Posts: 33
Topics: 14

PostPosted: Mon Apr 20, 2009 10:45 pm    Post subject: Reply with quote

Thank you very much Alissa
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group