Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to change the Delimiter in file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Wed Dec 16, 2009 1:20 pm    Post subject: Need to change the Delimiter in file
Reply with quote

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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 16, 2009 1:25 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Dec 16, 2009 1:37 pm    Post subject: Reply to: Need to change the Delimiter in file
Reply with quote

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

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Wed Dec 16, 2009 1:41 pm    Post subject: Reply to: Need to change the Delimiter in file
Reply with quote

Expat,

Parm which are passed to program are just date values. apart from this nothing is passed.

regards,
rupesh gupta
Back to top
View user's profile Send private message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Wed Dec 16, 2009 1:45 pm    Post subject: Reply to: Need to change the Delimiter in file
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Dec 16, 2009 1:46 pm    Post subject: Reply to: Need to change the Delimiter in file
Reply with quote

Quote:
will 'sort record reformatting' work for dynamic files


clarify the meaning of the above sentence please!
Back to top
View user's profile Send private message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Wed Dec 16, 2009 1:52 pm    Post subject: Reply to: Need to change the Delimiter in file
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Dec 16, 2009 2:00 pm    Post subject: Reply to: Need to change the Delimiter in file
Reply with quote

the manuals will usually tell all You want to know...
looks like You did not care to do any search on You own icon_evil.gif

here is a link to the relevant DFSORT page
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1cg20/2.4?ACTION=MATCHES&REQUEST=reformat&TYPE=FUZZY&SHELF=ICE1SH20.bks&DT=20060615173822&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

if the records are fixed format it should not be that difficult

as I hinted before also search the forums for sort dfsort syncsort record reformatting
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Dec 16, 2009 2:56 pm    Post subject:
Reply with quote

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'
Code:
ALTSEQ CODE=(F0F1) 



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

New User


Joined: 11 Jul 2008
Posts: 1
Location: India

PostPosted: Wed Dec 16, 2009 3:05 pm    Post subject: Step By step solution to your problem.
Reply with quote

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Dec 16, 2009 10:03 pm    Post subject:
Reply with quote

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

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Fri Dec 18, 2009 2:40 pm    Post subject: Reply to: Need to change the Delimiter in file
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us