Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Inserting special characters at specified position

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Inserting special characters at specified position
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: 8167
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jul 27, 2009 8:38 pm    Post subject:
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

Site Director


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

PostPosted: Mon Jul 27, 2009 11:16 pm    Post subject:
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 Moderator


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

PostPosted: Tue Jul 28, 2009 1:07 am    Post subject:
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    Post subject:
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    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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us