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

How to edit hexa value in the file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jmreddymca
Warnings : 1

New User


Joined: 14 Oct 2007
Posts: 29
Location: Bangalore

PostPosted: Mon Aug 29, 2011 1:22 pm
Reply with quote

Hi

I have a requirement like below;

File having 100 records. First 2 byrtes having numbers.
like rec1 is 1
rec2 is 2 ...so on.
I am going to add 10 more recs to above file.i want the continue number.
like 100 last records.
next 10 records count should be 101,102....

please help me on this.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 29, 2011 1:32 pm
Reply with quote

What is the problem that you are having in doing this?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 29, 2011 1:34 pm
Reply with quote

jmreddymca wrote:
please help me on this.


you need to define the record layout (first field anyway).

what type of file?

how are you going to add records?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Aug 29, 2011 2:22 pm
Reply with quote

Is this an exercice or a real requirement ?
Is it a sequential or a VSAM file ?
Do you have to do this in COBOL ?
Do you have other things to do on the file/records ?
Is the number binary or packed ? Give record layout.
Back to top
View user's profile Send private message
jmreddymca
Warnings : 1

New User


Joined: 14 Oct 2007
Posts: 29
Location: Bangalore

PostPosted: Tue Aug 30, 2011 3:35 am
Reply with quote

it's flat file, it's real time scenario only. using that file i am going to load into my table. Actually table is having 1st set of records. I want load 2nd set. if i use same sequence it will discard. i want this thru jcl.
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: Tue Aug 30, 2011 3:53 am
Reply with quote

You persist in NOT answering questions. Your first post states the sequence numbers are 2 bytes, yet you then talk about 100, 101, 102 ... which are THREE bytes. So are you using binary (COMP) or packed decimal (COMP-3) to store the values or another coding scheme you did not bother to explain, or are you just planning on violating the laws of mathematics and physics?

Next, you posted in the COBOL forum yet you say you "want this thru jcl" (sic). If you did not want a COBOL solution, why post in the COBOL forum?

Third, JCL does nothing but execute programs. Hence what you want to do cannot be done at all, period. If you had wanted to do this in a batch job using SORT, for example -- that's something very different (and terminology is critical in IT where similar terms may mean very different things -- running a batch job using SORT is NOT the same as doing something "thru jcl"). But as you stated your problem, it cannot be done.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 30, 2011 4:32 am
Reply with quote

OK, flat file I understand - QSAM.

"real time scenario only" - what do you mean by that?

"table" - what do you mean by that? DB2?
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: Tue Aug 30, 2011 10:13 am
Reply with quote

Hello,

Does your subject (How to edit hexa value in the file) have anything to do with what you are trying to do?

As you seem to be lost and are unwilling to post sufficient info for us to help, suggest you implement usng COBOL . . .
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top