MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
deepeshk79 Beginner Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
Posted: Fri Dec 26, 2003 1:53 am Post subject: outrec insert numeric
Hi all,
I need to insert 0000 as numeric into the first four characters of every record in a vsam file . Iam currently using the following outrec condition...
Code:
OUTREC FIELDS=(1:C'0000',5:7,1,6:26,8,14:8,8) .
But this inserts the first four zeroes as character and as the vsam key is packed numeric, this is giving an error.
Any way to insert it as numeric??
I tried the following ...but they didnt seem to work
Code:
OUTREC FIELDS=(1:P'0000',5:7,1,6:26,8,14:8,8)
=================================
OUTREC FIELDS=(1:ZD'0000',5:7,1,6:26,8,14:8,8)
=================================
OUTREC FIELDS=(1:PD'0000',5:7,1,6:26,8,14:8,8)
=================================
Any way out??
Regards
Deepesh
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Dec 26, 2003 7:48 am Post subject:
Deepesh,
try this
Code:
OUTREC FIELDS=(1:X'0000000C',5:7,1,6:26,8,14:8,8)
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
Frank Yaeger Sort Forum Moderator Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Dec 26, 2003 10:07 am Post subject:
Deepesh,
Here's another way to do it if you have DFSORT R14 PTF UQ90053 (Feb, 2003).
Code:
OUTREC FIELDS=(1:+0,TO=PD,LENGTH=4,
5:7,1,6:26,8,14:8,8)
For complete information on using DFSORT's decimal constants, see:
http://www.storage.ibm.com/software/sort/mvs/uq90053/online/srtmurfm.html#exp _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum