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
 

 

Initializing packed decimals with ZEROs

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

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Tue Mar 06, 2007 2:10 pm    Post subject: Initializing packed decimals with ZEROs
Reply with quote

I have an input file of length 300. I want to increase the size of it to 400.
This increased file is read in to a copy book which has packed decimals from position 301 to 321. I want to initialize this packed decimal positions to zeroes before read into this copy book in my program.
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 Mar 06, 2007 8:50 pm    Post subject:
Reply with quote

What is the length of each of the packed decimal fields you want to initialize? What do you want in positions 322-400?
Back to top
View user's profile Send private message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Wed Mar 07, 2007 11:54 am    Post subject:
Reply with quote

Frank,

I have four packed decimal variables of length 5 bytes each from 301.
I can have spaces after that.
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: Wed Mar 07, 2007 9:50 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/300)
//SORTOUT DD DSN=...  output file (FB/400)
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(301:4X'000000000C',400:X)
/*
Back to top
View user's profile Send private message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Mon Mar 12, 2007 4:06 pm    Post subject:
Reply with quote

Thanks Frank ! icon_smile.gif
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 Join key - Populate Zeros when Unpair... rexx77 DFSORT/ICETOOL 6 Thu May 12, 2016 12:22 am
No new posts conversion from char to packed decimal Musab Ahmed DFSORT/ICETOOL 7 Fri Apr 08, 2016 1:12 pm
No new posts NDM Packed Data file from Mainframes ... santhosh5983 IBM Tools 2 Wed Mar 30, 2016 2:36 am
No new posts Removing Leading Spaces and Removing ... rahulpala COBOL Programming 4 Fri Sep 04, 2015 4:58 am


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