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

Using File Mangaer in JCL to truncate chars above 50


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalyanp_80

New User


Joined: 03 Feb 2006
Posts: 41
Location: Hyderabad

PostPosted: Fri Feb 23, 2007 10:23 am
Reply with quote

Hi,

I am new to File Manager. But I have a requirement whcih asks me to use File Manager in JCL step.

My requirement is to create a FileManager batch job step to blank characters > 50 for column starting in 10 location and size is 70 characters. Suppose for a record if this column has 50 chars I should not touch this record, but if a record has anything greater than 50 I should delete characters after 50.

Thanks in advance!

Amith Patalay
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1207
Location: Bangalore,India

PostPosted: Fri Feb 23, 2007 11:30 am
Reply with quote

Hi There,

Would u please provide example of i/p & o/p?
Back to top
View user's profile Send private message
kalyanp_80

New User


Joined: 03 Feb 2006
Posts: 41
Location: Hyderabad

PostPosted: Fri Feb 23, 2007 11:42 am
Reply with quote

Ekta,

My input record is lil big :-). I will try to illustrate my requirement with simple example:

Assume my input file is FB with RECL = 10 and it has following input:
AAAAAAAAAA
BBBBB
CCCCCCC
DDD

Now my requiremnt is to copy only 5 positions of input file to output file. It should truncate all the data above > 5. Out put will look lie below:

AAAAA
BBBBB
CCCCC
DDD

Thanks
Amith
Back to top
View user's profile Send private message
abyss232006

New User


Joined: 31 Jan 2007
Posts: 3
Location: Kokata

PostPosted: Tue May 15, 2007 4:41 pm
Reply with quote

Hi Amith,
You can do it using icetool or DFSORT and 'OUTREC' formatting
Please find the below example

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
AAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCC
//OUT DD SYSOUT=*
//TOOLIN DD *
*REFORMAT THE IN1 DATA SET SO IT CAN BE SPLICED
COPY FROM(IN1) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
*USE OUTFIL OUTREC TO REMOVE THE SEQUENCE NUMBER
OUTFIL FNAMES=OUT,OUTREC=(1,05)
/*
[/code]

In case of DFsort you can use the control statement accordingly
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts File Aid Batch IBM Tools 7
No new posts To replace jobname in a file with ano... SYNCSORT 12
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Extract record using 2 input file int... JCL & VSAM 2
No new posts I want to append a record in an exist... CLIST & REXX 17
Search our Forums:

Back to Top