Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to insert into a packed decimal field

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

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Jul 31, 2007 6:30 pm    Post subject: how to insert into a packed decimal field
Reply with quote

Code:

//SORT01   EXEC PGM=ICEMAN                                           
//SORTIN   DD DSN=SRNR.TT.ORDMGMT.DLYSALEA.DATA.NIT,DISP=SHR
//SORTOUT  DD DSN=SRNR.TT.ORDMGMT.DLYSALEA.DATA.NITS,
//            DISP=(,CATLG,DELETE),                               
//            UNIT=DISKS,                                           
//            SPACE=(CYL,(25,5),RLSE),                               
//            RECFM=FB                           
//SYSIN    DD *                                                     
  OPTION COPY                                                   
  OUTREC IFTHEN=(WHEN=(1,1,CH,NE,C' '),                             
              BUILD=(1:1,104)),                                     
         IFTHEN=(WHEN=(1,1,CH,EQ,C' '),                             
              BUILD=(1:C'999999999999999999999',                     
                     22:PD'99999',44:44,8))                         
/*                                                                   


here is the jcl im using. From position 22 the field is declared as
ACTSALEI-ITEM-SEQ-NBR PIC 9(05) COMP-3.
I want to insert 99999 into this field. My above job abended.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Jul 31, 2007 8:26 pm    Post subject:
Reply with quote

You can't just throw random syntax in and hope it will work. You have to look up this kind of thing and use the correct syntax. PD'99999' is incorrect syntax and would have been flagged by an error message. The correct DFSORT syntax is:

Code:

  OPTION COPY                                           
  OUTREC IFTHEN=(WHEN=(1,1,CH,NE,C' '),                 
              BUILD=(1:1,104)),                         
         IFTHEN=(WHEN=(1,1,CH,EQ,C' '),                 
              BUILD=(1:C'999999999999999999999',       
                     22:+99999,TO=PD,LENGTH=3,44:44,8))
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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us