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
 

 

how to append characters in a record using sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vishal_a

New User


Joined: 24 May 2005
Posts: 45
Location: Noida

PostPosted: Sat Feb 18, 2006 12:28 am    Post subject: how to append characters in a record using sort
Reply with quote

hi team,

I have a file with 300,000 records , my requirement is to append three characters in front of every record.

for ex :

the records are in the shape of policies :

CONVTS8387TSD
CONVTS3474LIA
AAVT746464ESA

I want to append 'NLI' in front of every policy my resulting dataset should look like :

NLICONVTS8387TSD
NLICONVTS3474LIA
NLIAAVT746464ESA
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Feb 18, 2006 4:34 am    Post subject:
Reply with quote

What is the RECFM and LRECL of your input file?
Back to top
View user's profile Send private message
vishal_a

New User


Joined: 24 May 2005
Posts: 45
Location: Noida

PostPosted: Mon Feb 20, 2006 12:09 pm    Post subject: lrecl and recfm
Reply with quote

Hi frank,

the lrecl is 500 and recfm is FB for my input file

thanks
Back to top
View user's profile Send private message
fixdoubts

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Mon Feb 20, 2006 2:23 pm    Post subject:
Reply with quote

Hi,
This would do think.
Code:
//S1         EXEC  PGM=SORT         
//SYSOUT     DD  SYSOUT=*       
//SORTIN     DD DSN=TEST.INFILE
//SORTOUT    DD DSN=TEST.OUTFILE
//SYSIN      DD    *             
   SORT      FIELDS=COPY
   OUTREC    FIELDS=(C'NLI',1,500)
/*             


Regards,
Back to top
View user's profile Send private message
vishal_a

New User


Joined: 24 May 2005
Posts: 45
Location: Noida

PostPosted: Mon Feb 20, 2006 10:17 pm    Post subject:
Reply with quote

Thanks fixdoubts,

It worked fine...

regards
Vishal
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
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


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