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 move zeros to a comp field using ICETOOL?

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

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Wed Nov 21, 2007 1:41 pm    Post subject: How to move zeros to a comp field using ICETOOL?
Reply with quote

Hi All icon_biggrin.gif ,

I have an input file of LRECL 1700. It has a COMP value at column 1386.
The requirement is to initialize it with zeros. Its in S9(8) COBOL data type.

Can we achieve this using ICETOOL?

Thanks in advance.

Regards,
Ramanan R
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 2:14 pm    Post subject:
Reply with quote

Ramanan,

Quote:
Can we achieve this using ICETOOL?

Sure.

Code:
OUTREC FIELDS=(1386:8Z)

The above code moves 8 binary zeroes at 1386 col. Please change according to your requirement.
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Wed Nov 21, 2007 3:41 pm    Post subject:
Reply with quote

Murali,

Thanks for the reply.

I think the code should be
Code:

OUTREC FIELDS=(1386:4Z)

4Z instead of 8Z as DFSORT length for S9(8) COMP is 4. Please refer to the below link given by Frank in his previous post.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/C.3?DT=20060615185603

Correct me, if i'm wrong.

Thanks & Regards,
Ramanan R
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Wed Nov 21, 2007 3:57 pm    Post subject:
Reply with quote

You are correct Ramanan..

But as you mentioned " Its in S9(8) COBOL data type. "
Murali has Ignored that "It has a COMP"
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 4:06 pm    Post subject:
Reply with quote

Ramanan & Binaya,


Good point.
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 Nov 21, 2007 10:58 pm    Post subject:
Reply with quote

Code:

    OUTREC FIELDS=(1386:4Z)


This is the correct initialization value but the use of FIELDS will result in only having that one field in the output record. The rest of the input record will be lost. Here's a DFSORT job to init. just that field without changing the rest of the record:

Code:

//S1 EXEC  PGM=ICEMAN                     
//SYSOUT    DD  SYSOUT=*                     
//SORTIN DD DSN=...  input file (FB/1700)         
//SORTOUT DD DSN=...  output file (FB/1700) 
//SYSIN    DD    *                           
    OPTION COPY
    INREC OVERLAY=(1386:4Z)
/*


Quote:
Can we achieve this using ICETOOL?


If you want to use DFSORT's ICETOOL, you could use this job:

Code:

//S2    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=...  input file (FB/1700)
//OUT DD DSN=...  output file (FB/1700)
//TOOLIN DD *
COPY FROM(IN) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(1386:4Z)
/*
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 COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ICETOOL - RESIZE DYNAMICALLY kranthikumarb DFSORT/ICETOOL 0 Tue Nov 21, 2017 5:30 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am

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