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 an alphanumeric value..?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Wed Apr 06, 2011 1:52 am    Post subject: How to append an alphanumeric value..?
Reply with quote

Hi team,,

I need to know how to append an alphanumeric value with a numeric value.

Both the files have lrec of 80.

I used outrec buid option but i'm not able to get the exact o/p.

For example:

Input:
123
523

Output
A123
A523

I should use only SYNCSORT.. Please help..

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

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Apr 06, 2011 2:00 am    Post subject:
Reply with quote

Why not show us what you tried and what the output was.
Back to top
View user's profile Send private message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Wed Apr 06, 2011 2:04 am    Post subject: Reply to: How to append an alphanumeric value..?
Reply with quote

Quote:
SORT FIELDS=COPY
OUTREC BUILD=(1,1,C'A',2,77)


but i'm getting like

0A123
0A523
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Apr 06, 2011 2:11 am    Post subject: Reply to: How to append an alphanumeric value..?
Reply with quote

Don't you mean

OUTREC BUILD=(1:C'A',2,77)

isn't the 'A' supposed to be in column one?
Back to top
View user's profile Send private message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Wed Apr 06, 2011 2:15 am    Post subject: Reply to: How to append an alphanumeric value..?
Reply with quote

Ya.. It works. thanks a lot superk..

Please explain the syntax format...

Thanks,
Sab
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Apr 06, 2011 12:54 pm    Post subject: Re: Reply to: How to append an alphanumeric value..?
Reply with quote

sabarikanth wrote:
Ya.. It works. thanks a lot superk..

Please explain the syntax format...

Are you unable to read the manual for yourself ?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Apr 08, 2011 7:33 pm    Post subject:
Reply with quote

Spot the difference:
Code:
OUTREC BUILD=(1,1,C'A',2,77)

Code:
OUTREC BUILD=(1:C'A',2,77)
Back to top
View user's profile Send private message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Mon Apr 11, 2011 7:28 pm    Post subject: Reply to: How to append an alphanumeric value..?
Reply with quote

Hi,

I worked with the code

Code:
OUTREC BUILD=(1:C'A',2,77)


but i could see the value 'A' is not added in the first position in turn it got replaced with the first character.

I need the output as

I/p
123
O/p
A0123 Not as A123

Please let me know the correct format to add a value in the first position,.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Apr 11, 2011 7:38 pm    Post subject:
Reply with quote

Use...

Code:

OUTREC BUILD=(1:C'A',1,79)


Note: 80th character from input will be truncated here as you want your output has LRECL 80
Back to top
View user's profile Send private message
sabarikanth

New User


Joined: 07 Jun 2010
Posts: 59
Location: coimbatore

PostPosted: Mon Apr 11, 2011 7:51 pm    Post subject: Reply to: How to append an alphanumeric value..?
Reply with quote

great...!!! Thanks..
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am
No new posts To determine the range on a Alphanume... Prasanth Kumar COBOL Programming 3 Mon Feb 15, 2016 9:35 am
No new posts Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm


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