Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 4 Fri Sep 22, 2017 4:56 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us