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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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