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 

Convert Packed Decimal to Numeric Edited with Sign

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


Joined: 06 Nov 2003
Posts: 3
Topics: 2

PostPosted: Thu Nov 06, 2003 4:01 am    Post subject: Convert Packed Decimal to Numeric Edited with Sign Reply with quote

I have a requirement wherein I have to convert fields in the output file in to numeric edit field using JCL.
In the JCL shown below I have for instance in the OUTREC parameter mentioned (1:1,27,
28:28,5,PD,EDIT=(SIIIIIII.TT), ..Here I want to convert the packed decimal field S9(7)V99 in to -Z(7).99
When I run this JCL I get the desired output except that I dont get the sign in the numeric edit field ...instead of the sign I am getting the character S
in the output file.

Code:

//SYSIN        DD *                               
  SORT FIELDS=(1,27,CH,A)                           
  SUM FIELDS=(28,5,PD,38,3,PD,44,2,PD)             
  OUTFIL LRECL=512,                                 
         OUTREC=(1:1,27,                           
                 28:28,5,PD,EDIT=(SIIIIIII.TT),     
                 39:37,1,                           
                 40:38,3,PD,EDIT=(SIIIIT),         
                 46:43,1,                           
                 47:44,2,PD,EDIT=(IIT),             
                 50:47,463)


Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Nov 06, 2003 6:47 am    Post subject: Reply with quote

pmsteam,

You need to specify the parm signs when using the edit mask. For DFSORT, the M26 edit mask will give you the same thing, but the older versions of Syncsort doe not support M26.

Code:

//SYSIN        DD *                               
  SORT FIELDS=(1,27,CH,A)                           
  SUM FIELDS=(28,5,PD,38,3,PD,44,2,PD)             
  OUTFIL LRECL=512,                                 
         OUTREC=(1:1,27,                           
                 28:28,5,PD,EDIT=(SIIIIIII.TT),SIGNS=('+','-',,),     
                 39:37,1,                           
                 40:38,3,PD,EDIT=(SIIIIT),SIGNS=('+','-',,),         
                 46:43,1,                           
                 47:44,2,PD,EDIT=(IIT),
                 50:47,463)



Hope this helps...

cheers

kolusu

PS:I have neven seen LRECL parm on OUTFIL.Which sort product are you using?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Nov 06, 2003 11:01 am    Post subject: Reply with quote

Kolusu said
Quote:
For DFSORT, the M26 edit mask will give you the same thing


Kolusu,

M26 has the pattern ST...T which does not match any of the EDIT patterns pmsteam specified. M25 can be used for SIIIIT (sign is blank for plus and - for minus). M10 can be used for IIT. There isn't any pre-defined mask for SIIIIIII.TT.

But you are right that pmstream needs SIGNS with EDIT when S is specified in the pattern.

DFSORT accepts and ignores LRECL=n on the OUTFIL statement. This and quite a few other parameters that are meaningful for DFSORT/VSE, but not for DFSORT/MVS, are accepted and ignored to make migration from DFSORT/VSE to DFSORT/MVS easier.
_________________
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
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