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

how to append characters in a record using sort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Sat Feb 18, 2006 4:34 am
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


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 SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
Search our Forums:

Back to Top