View previous topic :: View next topic
|
Author |
Message |
Nimesh.Srivastava
New User
Joined: 30 Nov 2006 Posts: 78 Location: SINGAPORE
|
|
|
|
Hi All,
I want to recreate the file whose hex print is created by an Easytrieve program:
Code: |
//HPRINT EXEC PGM=EZTPA00,REGION=300K
//SORTWK01 DD UNIT=SYSDA,SPACE=(4096,(100,100),RLSE)
//EZTVFM DD UNIT=SYSDA,SPACE=(4096,(100,100),RLSE)
//FILEA DD DSN=DIBM.NIMESH.LOG,DISP=SHR
//SYSABOUT DD SYSOUT=D
//SYSUDUMP DD SYSOUT=D
//SYSSNAP DD SYSOUT=D
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
FILE FILEA
JOB INPUT FILEA
DISPLAY HEX FILEA
|
Now, can somebody help me with an Easytrieve to re-create the original file using the HEX dump which is in the SYSOUT or even the utility which can do the same.
Thanks,
Nimesh |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
A "little" unclear? |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
If you are trying to get HEX dump of a file you can get it with IDCAMS
Code: |
//PRNTHEX EXEC PGM=IDCAMS
//***************************
//* IDCAMS PRINT IN HEX *
//***************************
//SYSPRINT DD SYSOUT=*
//INFILE DD DSN=FILE.NAME,DISP=SHR
//SYSIN DD *
PRINT -
INFILE (INFILE) -
HEX
/*
//*
|
|
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
And in EZTRIEVE try this out:
[DISPLAY [file-name-1] HEX {field-name }[CONTROL literal-1] {record-name}
Code: |
[ ]
[ ] [NEWPAGE ] {file-name-2}
DISPLAY [file-name-1] [SKIP integer-1 ] HEX {field-name }
[SYSPRINT ] [CONTROL literal-1] {record-name}
[ ] [ ]
|
|
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
Probably this is a better example In EZt..:
Code: |
FILE PERSNL
%PERSNL
JOB INPUT NULL NAME MYPROG
GET PERSNL STATUS
IF PERSNL:FILE-STATUS NE 0
DISPLAY PERSNL:FILE-STATUS
ELSE
DISPLAY HEX PERSNL
END-IF
STOP
|
|
|
Back to top |
|
|
Nimesh.Srivastava
New User
Joined: 30 Nov 2006 Posts: 78 Location: SINGAPORE
|
|
|
|
Hi I think I wasn't able to explain clearly. Actually what I need is to access a file in the production region of ours I can only access is via JCL no direct access allowed even in case of program failures.
So in order to simulate the problem in my UAT env I need to have the same file, the way they do it over here is first take a HEX print of the file using the JCL I submitted in the thread and then reconstructing the file using another JCL in the UAT env.
Now, its the other part I need help ie. how to reconstruct the production file using the HEX print.
For ex
This is the original file lets say A
010261SG0600002761 X457641 00HOMX457641 00 20060119000000
This is output of the JCL lets say B
CHAR 010261SG0600002761 X457641 00HOMX457641 00 00001000
ZONE FFFFFFECFFFFFFFFFF44444444EFFFFFF4444444444444FFCDDEFFFFFF4444444444444FF444444444444444444444444444 00001100
NUMR 0102612706000027610000000074576410000000000000008647457641000000000000000000000000000000000000000000 00001200
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95..100 00001300
0CHAR 20060119000000 00001400
ZONE 44444444444444444FFFFFFFFFFFFFF4444444444444444444 00001500
NUMR 00000000000000000200601190000000000000000000000000 00001600
101...5...10...15...20...25...30...35...40...45...50 00001700
Now what I want is to re-construct A using only B
Thanks
Nimesh |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
So, you are saying that the only way to get a copy of a production dataset is to print a hex dump of it and then feed that hex dump printout to a program that rebuilds the needed dataset?
How do you get the printout? paper?
If you can run jcl on the prod system, the dumper program, why not an ftp? or something else to transfer the data?
Does anybody else on the forum have that sort of problem? |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
My ox has never been so flummed.
As William states, you can obviously 'access' (read) the file via JCL in order to do the hex dump.
and if that dump is accessable in order to translate it via a program as you are asking ( to create a UAT version of it in order to investigate your problem) then I am at a loss as to why you could not be allowed to just copy the damn thing in the first place?
Are you superiors aware that you are able to replicate production data by such nefarious means?
The hoops that you have to jump through just to do your job in some shops is unbelievable!
The botom line is that you are trying to fix a production problem, I presume which any delay in doing so could cost the company money but they will not make that process as quick and painless as possible!
Name and shame so we can avoid working there! |
|
Back to top |
|
|
Nimesh.Srivastava
New User
Joined: 30 Nov 2006 Posts: 78 Location: SINGAPORE
|
|
|
|
Hi,
See the point is the Prod is on a different machine and the HEX job listing we get is directed to out UAT env in the OC class listing we can use the listing to re-create the file.
And of for your question William, no we are not allowed to ftp as on production machine FTP is not enabled we have something called C (connect direct) to transfer the files to windows system. But in this case its not allowed as it is to be done for fixing and testing purposes.
Yes, bosses are aware of such a process and there has been discussions on the availability of direct file transfer to UAT but IT says if there is an way ie hex print to file then do it that way and BU is still discussing over it.
Hope, this resolves your concerns.
Thanks
Nimesh |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
Jeez!
Ok I'll come down off my soap box now!
What is the RECFM and LRECL of your file? |
|
Back to top |
|
|
Nimesh.Srivastava
New User
Joined: 30 Nov 2006 Posts: 78 Location: SINGAPORE
|
|
|
|
Hey I think you enjoyed it
Ok
RECFM is FB
and LRECL is 150
Thanks
Nimesh |
|
Back to top |
|
|
|