View previous topic :: View next topic
|
Author |
Message |
Luke21
New User
Joined: 15 Jan 2010 Posts: 3 Location: South Africa
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Luke21
New User
Joined: 15 Jan 2010 Posts: 3 Location: South Africa
|
|
|
|
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 |
|
|
mftrigger
New User
Joined: 18 Feb 2006 Posts: 23 Location: chennai
|
|
|
|
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 |
|
|
Luke21
New User
Joined: 15 Jan 2010 Posts: 3 Location: South Africa
|
|
|
|
outrec did the trick, thanks allot i really appreciate all the help |
|
Back to top |
|
|
|