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: 113
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

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: 113
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
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
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm


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