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

Help required on Avoiding trailor scrambling


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

New User


Joined: 23 Feb 2006
Posts: 16

PostPosted: Thu May 10, 2007 10:56 am
Reply with quote

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
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu May 10, 2007 11:56 am
Reply with quote

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
View user's profile Send private message
pranta

New User


Joined: 23 Feb 2006
Posts: 16

PostPosted: Thu May 10, 2007 12:52 pm
Reply with quote

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
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu May 10, 2007 1:07 pm
Reply with quote

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
View user's profile Send private message
pranta

New User


Joined: 23 Feb 2006
Posts: 16

PostPosted: Thu May 10, 2007 3:46 pm
Reply with quote

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
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Thu May 10, 2007 4:00 pm
Reply with quote

Can u just post the jcl ur using now
Back to top
View user's profile Send private message
pranta

New User


Joined: 23 Feb 2006
Posts: 16

PostPosted: Thu May 10, 2007 4:06 pm
Reply with quote

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
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Thu May 10, 2007 4:58 pm
Reply with quote

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
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 Required Date Format in Include Sort ... DFSORT/ICETOOL 6
No new posts COMPUSET/XICS z/os document required All Other Mainframe Topics 1
No new posts Number of Packages required for stati... DB2 4
No new posts Receommendations required for adding ... JCL & VSAM 5
No new posts FTP help required All Other Mainframe Topics 3
Search our Forums:

Back to Top