View previous topic :: View next topic
|
Author |
Message |
jmreddymca Warnings : 1 New User
Joined: 14 Oct 2007 Posts: 29 Location: Bangalore
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What is the problem that you are having in doing this? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
jmreddymca Warnings : 1 New User
Joined: 14 Oct 2007 Posts: 29 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|