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

replace/reformat a trailer value to numeric on flat file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Luke21

New User


Joined: 15 Jan 2010
Posts: 3
Location: South Africa

PostPosted: Mon Jan 18, 2010 4:59 pm
Reply with quote

i have thus far extracted the trailer from a data set, i would like to remove the spaces or reformat the field how would one go about doing it in JCL?


Let b = spaces

bb007802
FFFFFFFF
FF007802

Many Thanks
Luke21
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jan 18, 2010 5:13 pm
Reply with quote

Once more let us clarify exactly what JCL is.

it is Job Control Language.

By itself it does nothing. It is used to invoke the chosen program and to define which datasets are to be used by the DD names associated with the chosen program.

JCL does not have magical powers that solve all problems, JCL is merely the vehicule for telling the processor which program you want it to execute.

So, if you might just care to tell us which program you wish the JCL to execute, we might be able to help you
Back to top
View user's profile Send private message
Luke21

New User


Joined: 15 Jan 2010
Posts: 3
Location: South Africa

PostPosted: Mon Jan 18, 2010 5:34 pm
Reply with quote

I used program ICETOOL to extract the header and trailer from the INFILE, however i am having difficulty elimination the spaces at position 1 and 2.
The record length is 8 bytes.

Ex. current layout is
..007802

Desire output in numeric

007802 or 7802

I attached the instruction code used thus far below.

Thanks again

Code:

//STEP0103  EXEC  PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG    DD SYSOUT=*                                       
//INFILE      DD DSN=LUKE21.TEST1,DISP=SHR                     
//OUTFILE   DD DSN=LUKE21.D0.SQ008,DISP=(NEW,CATLG), 
//                   DCB=(RECFM=FB,LRECL=8,BLKSIZE=28800),           
//                   SPACE=(TRK,(1,1),RLSE),UNIT=3390               
//TOOLIN DD *                                                 
*                                                             
**------------------------------------*                       
* GET COUNT OF RECORDS INPUT FILE  *                       
**------------------------------------*                       
*                                                             
  COPY FROM(INFILE) USING(CTL1)                               
/*                                                           
//CTL1CNTL DD *                                               
  OUTFIL FNAMES=OUTFILE                                       
  INCLUDE COND=(1,2,CH,EQ,X'0000',OR,1,2,CH,EQ,X'FFFF')       
/*
Back to top
View user's profile Send private message
mftrigger

New User


Joined: 18 Feb 2006
Posts: 23
Location: chennai

PostPosted: Mon Jan 18, 2010 7:19 pm
Reply with quote

Halo Luke,

In the ICETOOL control card, you could do the following, to reach ur goal -

1. Find the blank space in first to positions. This can be achieved by using IF THEN .. WHEN option.

2. Remove the spaces. This can be done using OUTREC option.

Note:
------
1. If the spaces are uniform throughout the file, then a OUTREC alone would achieve ur goal.
2. You could get the syntax for these options in forums as well as in Quick reference QWS.
Back to top
View user's profile Send private message
Luke21

New User


Joined: 15 Jan 2010
Posts: 3
Location: South Africa

PostPosted: Mon Jan 18, 2010 8:55 pm
Reply with quote

outrec did the trick, thanks allot i really appreciate all the help
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top