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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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