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
 

 

replace/reformat a trailer value to numeric on flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: replace/reformat a trailer value to numeric on flat file
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jan 18, 2010 5:13 pm    Post subject:
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    Post subject: PGM = ICETOOL USED TO EXTRACT
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    Post subject: Re: PGM = ICETOOL USED TO EXTRACT
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    Post subject: thanks it worked
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm


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