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

Inserting special characters at specified position


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

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Mon Jul 27, 2009 8:31 pm
Reply with quote

Hi All,

I have a file of record length around 6000 bytes.

I want to insert "**" at every position 1024. And then shift the data from 1024 position to right side.

This should happen for all the records.

Please let me know how to do this through jcl. Using program we can achieve this. I need it through jcl.

Thanks inadvance.

Ram.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jul 27, 2009 8:38 pm
Reply with quote

JCL EXECUTES PROGRAMS!

JCL does not change files, JCL does not allow you to shift data, JCL does nothing but execute programs. Determine which program you want to use to make this change, then somebody can give you more information -- but as it stands your request cannot be accomplished because JCL will not do what you want it to do.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Jul 27, 2009 11:16 pm
Reply with quote

Hello,

Quote:
Determine which program you want to use to make this change
This does not mean that you have to write a program. . .

You would probably use some standard utility to do this . . .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 28, 2009 1:07 am
Reply with quote

Ram,

Assuming your input file has RECFM=FB and LRECL=6000, you can use a DFSORT job like the following to do what you asked for. The job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/6000)
//SORTOUT DD DSN=...  output file (FB/6002)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,1023,1024:C'**',1026:1024,4977)
/*
Back to top
View user's profile Send private message
Rambhupal.chaudari

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Tue Jul 28, 2009 11:13 am
Reply with quote

Thank you Frank,

This is what am looking for..
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Count the number of characters in a f... CA Products 1
Search our Forums:

Back to Top