Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
unwanted characters in numeric fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Mon Jul 23, 2007 5:56 pm    Post subject: unwanted characters in numeric fields
Reply with quote

hi guys,

i have this file, LRECL=46 and RECFM=FB. with fields:
> field1 PIC 9(4)
> field2 PIC X(15)
> filler PIC X(1)
> sum1 PIC 9(18)
> sum2 PIC 9(18)

this is my sample input file:

Code:

11401000000         000000000000001213000000000000001213
11401000002         000000000015804260000000000015804260
11401000003         000000001002833160000000001002811224
11401000010         000000000000000313000000000000000313
11401000013         000000000000589971000000000000589780
11401031001         000000000000000183000000000000000183
11401031002         000000000000000506000000000000000506


my requirement is using field1 and the first four characters of field2, i should execute a SUM FIELDS for sum1 and sum2.

this is the SORT step that i used:
Code:

//STEP002  EXEC PGM=SORT                               
//SORTIN   DD   DSN=SUM1,DISP=SHR               
//SORTOUT  DD   DSN=SUM2,DISP=(NEW,CATLG,DELETE),
//         AVGREC=K,SPACE=(56,(1,1),RLSE),             
//         RECFM=FB,LRECL=56                           
//SYSIN    DD   *                                       
  SORT FIELDS=(1,8,ZD,A)                               
  SUM FIELDS=(21,18,39,18),FORMAT=ZD                   
//SYSOUT   DD   SYSOUT=*
//                     


it ran successfully. however, the output looked like this:
Code:

11401000000     00000000101922891G00000000101920679{
11401031001     00000000000000068I00000000000000068I


there are characters in the 38th and 56th positions after i've sum them up.

what could be the reason for these unwanted characters? please help. thanks in advance.
Back to top
View user's profile Send private message

hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Mon Jul 23, 2007 6:05 pm    Post subject: Re: unwanted characters in numeric fields
Reply with quote

sorry. the LRECL should be 56, not 46.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Jul 23, 2007 6:06 pm    Post subject:
Reply with quote

If by unwanted, you are referring to the G, I and {, those are the signs on the ZD numbers.
There are editing functions that will remove them back to unsigned ZD.
Back to top
View user's profile Send private message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Mon Jul 23, 2007 6:09 pm    Post subject: Re: unwanted characters in numeric fields
Reply with quote

hi william,

so, you mean that it is only natural for those characters to appear?

how could i remove those?

thanks in advance.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Jul 23, 2007 6:15 pm    Post subject:
Reply with quote

hallecodec
Quote:
what could be the reason for these unwanted characters?

To avoid this u can use
Code:

  OPTION ZDPRINT
in SYSIN.

For details about ZDPRINT look at http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca20/3.17.1?ACTION=MATCHES&REQUEST=ZDPRINT&TYPE=FUZZY&SHELF=ICE1SH20.bks&DT=20060615185603&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Mon Jul 23, 2007 6:25 pm    Post subject: Re: unwanted characters in numeric fields
Reply with quote

hi krisprems and william,

thanks for the tip: OPTION ZDPRINT, this command was new to me. there are no more "unwanted characters" in my output.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us