Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 85
Location: India

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
References
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 4579
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: 85
Location: India

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1