Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us