IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can you please give the EDIT CLAUSE for this


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Wed May 31, 2006 5:05 pm
Reply with quote

Hi Frank,
Can you give the EDIT PATTERNS for the a value which is defined a
S9(3)V99.Please explain the same.

Regards,
Mani
Mumbai
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed May 31, 2006 6:40 pm
Reply with quote

Hi,
Here is the table.This is applicable for SYNCSORT.

Code:


                            Editing Masks                                   

Mask         Pattern                     Signs              Length         
----         -------                     -----              ------         
                                                                           
 M0      IIIIIIIIIIIIIITS               (,,' ',-)           d+1           
                                                                           
 M1      TTTTTTTTTTTTTTTS               (,,' ',-)           d+1           
                                                                           
 M2      I,III,III,III,IIT.TTS          (,,' ',-)           d+1 + ?d/3|   
                                                                           
 M3      I,III,III,III,IIT.TTCR                             d+2 + ?d/3|   
                                                                           
 M4      SI,III,III,III,IIT.TT          (+,-)               d+1 + ?d/3|   
                                                                           
 M5      SI,III,III,III,IIT.TTS         (' ',(,' ',))       d+2 + ?d/3|   
                                                                           
 M6      III-TTT-TTTT                                       12             
                                                                           
 M7      TTT-TT-TTTT                                        11             
                                                                           
 M8      IT:TT:TT                                           8             
                                                                           
 M9      IT/TT/TT                                           8             
                                                                           
 M10     IIIIIIIIIIIIIIT                                    d             
                                                                           
 M11     TTTTTTTTTTTTTTT                                    d             
                                                                           
 M12     SIII,III,III,III,IIT           (' ',-)             d+1 + ?(d-1)/3|
                                                                           
 M13     SIII.III.III.III.IIT           (' ',-)             d+1 + ?(d-1)/3|
                                                                           
 M14     SIII III III III IITS          (' ',(,' ',))       d+2 + ?(d-1)/3|
                                                                           
 M15     III III III III IITS           (,,' ',-)           d+1 + ?(d-1)/3|
M16     SIII III III III IIT           (' ',-)             d+1 + ?(d-1)/3|
                                                                           
M17     SIII'III'III'III'IIT           (' ',-)             d+1 + ?(d-1)/3|
                                                                           
M18     SI,III,III,III,IIT.TT          (' ',-)             d+1 + ?d/3|     
                                                                           
M19     SI.III.III.III.IIT,TT          (' ',-)             d+1 + ?d/3|     
                                                                           
M20     SI III III III IIT,TTS         (' ',(,' ',))       d+2 + ?d/3|     
                                                                           
M21     I III III III IIT,TTS          (,,' ',-)           d+1 + ?d/3|     
                                                                           
M22     SI III III III IIT,TT          (' ',-)             d+1 + ?d/3|     
                                                                           
M23     SI'III'III'III'IIT.TT          (' ',-)             d+1 + ?d/3|     
                                                                           
M24     SI'III'III'III'IIT,TT          (' ',-)             d+1 + ?d/3|     
                                                                           
M25     SIIIIIIIIIIIIIIT               (' ',-)             d+1             
                                                                           
M26     STTTTTTTTTTTTTTT               (+,-)               d+1             
                                                                           
               


Thanks
Krishy
Back to top
View user's profile Send private message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Wed May 31, 2006 6:44 pm
Reply with quote

Hi krish,
Thanks for your reply.Can you please tell in particular which EDIT Pattern ,shall i use for S9(3)V99
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed May 31, 2006 7:28 pm
Reply with quote

Hi,
Please show your input and expected o/p with record format and length details.

Thanks
Krishy
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed May 31, 2006 8:41 pm
Reply with quote

Quote:
Can you give the EDIT PATTERNS for the a value which is defined a
S9(3)V99.Please explain the same.


Not sure what you want here. S9(3)V99 is a 5-byte ZD field (the decimal point is implied but not contained in the internal representation of the value). With DFSORT, you can use the pre-defined edit masks M0-M26, as appropriate, e.g.

Code:

   OUTREC BUILD=(21,5,ZD,M18)


or you can use your own edit mask, e.g.

Code:

   OUTREC BUILD=(21,5,ZD,EDIT=(STTT.TT),SIGNS=(+,-))


I can't really tell you which edit mask to use. That depends on what YOU want the output to look like.

For a tutorial on using DFSORT edit masks, see the "Editing Numeric Fields" section in Chapter 5 of "z/OS DFSORT: Getting Started".

For complete information on using DFSORT edit masks, see the "OUTFIL Control Statements" section in Chapter 3 of "z/OS DFSORT Application Programming Guide".

You can access all of the DFSORT books online from:

Use [URL] BBCode for External Links

I'd suggest using the pdf versions of the books as they're formatted better.
Back to top
View user's profile Send private message
manishram1

New User


Joined: 23 Mar 2006
Posts: 34

PostPosted: Wed May 31, 2006 9:36 pm
Reply with quote

Sorry...Frank..It is S9(3)V99 COMP-3
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed May 31, 2006 10:07 pm
Reply with quote

That's a 3-byte PD value rather than a 5-byte ZD value, but you can use the edit masks in the same way, e.g.


Code:

  OUTREC BUILD=(21,3,PD,M18)


Code:

  OUTREC BUILD=(21,3,PD,EDIT=(STTT.TT),SIGNS=(+,-))


See the following for a table showing COBOL data types vs DFSORT formats:

www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/srtmacfm.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Need help to resolve a hard edit COBOL Programming 8
This topic is locked: you cannot edit posts or make replies. Need help to resolve a hard edit COBOL Programming 4
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:

Back to Top