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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am


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