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
 
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 How can I convert charactor to fixed ... liying DFSORT/ICETOOL 7 Tue May 22, 2018 3:35 pm
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts How to group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm

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