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

Move NULL value while copying from i/p to o/p


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Wed Aug 13, 2008 3:33 pm
Reply with quote

Hi,

I had a input file of LRECL=200 and RECFM=FB.
I want to copy the records from this file to another file which is of LRECL=1000 and RECFM=FB moving NULL value from 201 onwards. How it can be done.

I tried this way but it didn't worked.
Code:

//STEP010  EXEC PGM=ICETOOL                                   
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=*                                         
//SYSUDUMP DD SYSOUT=C                                         
//SYSPRINT DD SYSOUT=*                                         
//INPUT    DD DSN=INPUT.FILE.LEN200,DISP=SHR
//OUTPUT   DD DSN=OUTPUT.FILE.LEN1000,       
//             DISP=(,CATLG,DELETE),                       
//             RECFM=FB,LRECL=1000,SPACE=(CYL,(500,500),RLSE)
//TOOLIN   DD *                                               
  COPY FROM(INPUT) TO(OUTPUT) USING(CTL1)                     
/*                                                             
//CTL1CNTL DD *                                               
  OUTFIL FNAMES=OUTPUT,REMOVECC                               
  OUTREC FIELDS=(1:1,200,201:X'00',LENGTH=800)                   
/*                                                             


If i give 201:x'00000000000000000.....' till 1600 zeroes it will default NULL in 800 bytes. But i want in simpler way.
Is there any other way to move NULL values from 201 to 1000 position of my output file.
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: Wed Aug 13, 2008 10:15 pm
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.LEN200,DISP=SHR
//SORTOUT  DD DSN=OUTPUT.FILE.LEN1000,
//             DISP=(,CATLG,DELETE),
//             SPACE=(CYL,(500,500),RLSE)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,200,800Z)
/*


You can use 800X'00' instead of 800Z if you prefer.
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Thu Aug 14, 2008 10:22 am
Reply with quote

Thanks frank.
It is simple. But i didn't get idea to do this way.

Thank you so much.
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 Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
Search our Forums:

Back to Top