View previous topic :: View next topic
|
Author |
Message |
rupesh gullu
New User
Joined: 12 Dec 2008 Posts: 96 Location: Gurgaon
|
|
|
|
Hi,
I have one job which creates one dynamic file and its a report. report has pipe as delimiter but now they want broken pipes to be its delimiter. I cannot change the program. Need to do it in JCL itself. Please help.
Regards,
rupesh |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
When you ask for hekp, it would be appreciated if you could give us rather a lot more information that the "Less than basics" you have bothered to give us.
Now let me think about this, you want to change the output of a program but do not or can not change the program. Unless the program uses PARM or SYSIN values to accept information from the JCL then it ain't gonna happen. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
look like the usual organization with a very poor change management process!
usually when people follow these approach it means that the change has not been approved
( or the end users are too lazy to follow ordinary practices )
if the report recipient has the need he must follow the proper procedures in order to implement the application change
much cheaper to change one little statement in a program than to add a step to the procedure
anyway depending on the sort product installed
searching for 'sort record reformatting" should give You a hint on how to proceed |
|
Back to top |
|
|
rupesh gullu
New User
Joined: 12 Dec 2008 Posts: 96 Location: Gurgaon
|
|
|
|
Expat,
Parm which are passed to program are just date values. apart from this nothing is passed.
regards,
rupesh gupta |
|
Back to top |
|
|
rupesh gullu
New User
Joined: 12 Dec 2008 Posts: 96 Location: Gurgaon
|
|
|
|
Enrico,
will 'sort record reformatting' work for dynamic files. I have no idea if sort works for dynamic files and moreover this is output file which is created by program. Program chages would have been much easier but they dont want to chage them.
regards,
rupesh |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
will 'sort record reformatting' work for dynamic files |
clarify the meaning of the above sentence please! |
|
Back to top |
|
|
rupesh gullu
New User
Joined: 12 Dec 2008 Posts: 96 Location: Gurgaon
|
|
|
|
enrico,
just want to say that i have no idea if using sort utility i can change the delimiter to broken pipes. I can change the program but they dont want it.
Here is sample o/p of file which need to be changed.
Code: |
MSP|00088|00083|00121|11|2009|0000481|
MSP|00090|00083|00121|11|2009|0000395|
|
regards,
rupesh |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
here is an example where all the existence of '0' is replaced by '1' from position 1 up to 80 bytes. You can modify the sort card accordingly...
Code: |
//*******************************************************
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
1234567890
0234567890
1034567890
1230567890
1230567890
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
ALTSEQ CODE=(F0F1)
OUTREC FIELDS=(1,80,TRAN=ALTSEQ)
/* |
In the below code, F0 is the hexadecimal value of '0' and F1 is hexaddecimal value of '1'
Alternative approach -- --
The following SORT card replaces all occurrences of ' ' to '0'.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
MAINFRAME
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FINDREP=(INOUT=(C' ',C'0'))
/* |
|
|
Back to top |
|
|
subhrm
New User
Joined: 11 Jul 2008 Posts: 1 Location: India
|
|
|
|
1- First in the Job/PROC change the file name of the report((let's call it Rpt), in the step where it's currently created to a different name. (let's call it Work)
2- Add a new step . Here you can use DFSORT or a small program in any language to replace the charcater you want with desired one. In this step your input would be Work and output would be Rpt.
Hope this helps !! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If the file contains 100 records, making a copy is not a problem.
If the file contains several hundred million records (as many of mine do), creating an entire copy (only to prevent making a very simple code change) should be unacceptable. . .
If you make the code change, suggest the delimeter be stored external to the code - so when someone wants to change it again or change it back, no code change is necessary. |
|
Back to top |
|
|
rupesh gullu
New User
Joined: 12 Dec 2008 Posts: 96 Location: Gurgaon
|
|
|
|
Hi all,
thanks for your response. file was created successfully using below sort card
Code: |
//SYSIN DD *
SORT FIELDS=COPY
ALTSEQ CODE=(4F6A)
OUTREC FIELDS=(1:1,316,TRAN=ALTSEQ)
//*
|
Regards,
rupesh gupta |
|
Back to top |
|
|
|