View previous topic :: View next topic
|
Author |
Message |
pranta
New User
Joined: 23 Feb 2006 Posts: 16
|
|
|
|
Hi Friends,
I am facing a problem as below.Please let me know if you have any solution.
I have a i/p file on which i am using a non IBM utility to scramble the data available between column 6 to 13(for security purpose) .The technique is working fine but in the process the trailor is also getting scrambled which we do not want.
The utility has no option to direct the scrambling for particular record types.
Please let me know if any other utility can be used after the scramble step which will read the original trailor and write it back to the scrambled trailor.
Thanking you,
Pranta |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Trailer - Are you referring to trailer record (last record) from the original file?
If you want to copy trailer record from the original file to after scrambed file, then you can write SORT step to select only the trailer record and append it to the after scrambled file. |
|
Back to top |
|
|
pranta
New User
Joined: 23 Feb 2006 Posts: 16
|
|
|
|
yes trailor means last record of the file.But in that case the scrambled trailor will also be present and the original trailor will append after that.How can i remove the scrambled trailor?Please provide the sort sysin detail .
Thanks for your quick response. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
How does your Trailer record looks like? is there a way you can identify your trailer record.
Please Post your trailer record identifier data. |
|
Back to top |
|
|
pranta
New User
Joined: 23 Feb 2006 Posts: 16
|
|
|
|
The last detail record out of many+trailor record(02 at the beginning identifies detail record;99 at the beginning identifies trailor) is as below in ip file:
02;5399698453;COR;XXXX-XXXXXX-24006;N;CANADIAN PENSION CON
99;20070509;00001530; ; ;
When scrambled the op file contains the following:
02;5397012224;COR;XXXX-XXXXXX-24006;N;CANADIAN PENSION CON
99;20233;83130001530; ; ;
The detail record is fine but the scrambling (from column 6 for length 8)is scrambling the trailor (99 at the beginning) also which is not required.
The trailor should be same as in the ip file. |
|
Back to top |
|
|
manihcl85 Warnings : 1 New User
Joined: 11 Jan 2007 Posts: 52 Location: chennai
|
|
|
|
Can u just post the jcl ur using now |
|
Back to top |
|
|
pranta
New User
Joined: 23 Feb 2006 Posts: 16
|
|
|
|
The JCL is as below:
********************************************************
//* PROGRAM: RZ511Q
//* PURPOSE: SCRAMBLE THE MR NOS
//* RESTARTABLE: YES
//*
//* ----------------------------------------------------------
//STEP030A EXEC PGM=GOUSCRMD,PARM='GOUSCRMB'
//*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//SYSUT1 DD DSN=&STAT.PV7987A.RZQ100.BAL,DISP=SHR
//*SYSUT1 DD DSN=&STAT.RZ.RZQ100.BAL,DISP=SHR
//SYSUT2 DD DSN=&STAT.PV7987A.RZQ100.BAL.SCRAMBLE,
//*SYSUT2 DD DSN=&STAT.RZ.RZQ100.BAL.SCRAMBLE,
// DISP=(,CATLG,DELETE),
// LRECL=2032,RECFM=FB,AVGREC=K,
// DATACLAS=&DCLASS
//SYSIN DD DSN=&STAT.PV7987A.RZQ100.BAL.SYSIN,
//*SYSIN DD DSN=&STAT.RZ.RZQ100.BAL.SYSIN,
// DISP=SHR
*********************************************************
In the SYSIN the parameters are as below to SCRAMBLE A 08 CHARACTER A/N FIELD STARTING IN POS 06:
S,A,06:08 |
|
Back to top |
|
|
manihcl85 Warnings : 1 New User
Joined: 11 Jan 2007 Posts: 52 Location: chennai
|
|
|
|
Please look into the code below which will sort the record between header and trailer it wont disturb those records and sort inbetween records. i am not sure what utility ur using. try similar kind of logic in ur code.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=
//SORTIN DD
[size=9]HEDRINF11D34254131
34 119161225311989717FANDERSON
34 21328422531198575FLYONS
34 C18176225311911FMITCHELL
34 D1965895253123123MBENTON
34 B252918625311994122MGONZALEZ
34 4266757125311911MMATHEW
34 B2868752533199515MSOLORIO
34 C35483572531196693FMACARIO
34 F4783232532225318FWILSON
TRALINF11D34254131294138[/size]
/
//SORTOUT DD DSN=... output file
//SYSIN DD
Put special key of '1' in 81 for data records.
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1')),
For header record, put special key of '' in 81.
IFTHEN=(WHEN=(1,4,CH,EQ,C'HEDR'),OVERLAY=(81:C'')),
For trailer record, put special key of '9' in 81.
IFTHEN=(WHEN=(1,4,CH,EQ,C'TRAL'),OVERLAY=(81:C'9'))
Sort by special key ('', '1' or '9') and then regular key.
SORT FIELDS=(81,1,CH,A,14,1,CH,A)
Remove special key.
OUTREC FIELDS=(1,8)
/
By using a special key of '0' for the header |
|
|
Back to top |
|
|
|