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
 

 

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

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

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Wed Aug 13, 2008 3:33 pm    Post subject: Move NULL value while copying from i/p to o/p
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Aug 13, 2008 10:15 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.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: 120
Location: USA

PostPosted: Thu Aug 14, 2008 10:22 am    Post subject: Reply to: Move NULL value while copying from i/p to o/p
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    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 Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm


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