MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting fields in SYNCSORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 41
Topics: 30

PostPosted: Tue Sep 28, 2004 1:19 am    Post subject: Converting fields in SYNCSORT Reply with quote

Hi,
We're using SYNCSORT in our workshop. There is a small requirement to convert the following fields.


Source : DISP-NRX PIC S9(14)V9999 COMP-3.


Destination : WS-RX-QUANTITY-AMT PIC S9(5)V9(4) COMP-3.


Please suggest me know how can I use the INREC and OUTREC fields for the above conversion..?


Thanks
Kris
Back to top
View user's profile Send private message
C D' Rozario
Beginner


Joined: 16 Dec 2002
Posts: 5
Topics: 1
Location: San Francisco

PostPosted: Tue Sep 28, 2004 2:42 am    Post subject: Reply with quote

Hi Kris,

Try this sort card:
Code:


//SYSIN DD *
  SORT FIELDS=COPY
  OUTREC FIELDS=(1,10,PD,PD,LENGTH=5)



This solution is based on the assumption that your packed field is the first field in the input as well as the output file.


Craig
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Sep 28, 2004 5:31 am    Post subject: Reply with quote

kris,

I don't think you can have more than 8 bytes on outrec for a packed decimal field. so you cannot directly convert 10 bytes to 5 bytes packed.

In the 10 byte packed field, the first 2 bytes will be zeroes unless you have a very huge number. So you can validate from the 3rd byte for 8 bytes and convert it to 5 byte packed decimal field.
Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(3,8,PD,PD,LENGTH=5)


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group