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

how to insert into a packed decimal field


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Tue Jul 31, 2007 8:26 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Join 2 files according to one key field. JCL & VSAM 3
Search our Forums:

Back to Top