I have a requirement tp assign sequence no to two different files with same DCB parameter: LRECL=4900, RECFM=FB
Need to assign continous sequence number to these files at different positions
File1: LRECL=4900, RECFM=FB with record type as 'P'(position 1).
Assign 12 byte sequence number at positon 2406
File2: LRECL=4900, RECFM=FB with record type as 'B' (position 1).
Assign 12 byte sequence number at position 3406. The sequence number assigned to this file should start from the next available sequence number from file1.
"IFTHEN=(WHEN=(1,1,SS,EQ,C'P,B')" - Is there any significance of 'SS' here
2. Also, if in the sequence number i need to have numbering like N00000000001
N00000000002
N00000000003
....................
....................
N000000000090
(sequence is 12 bytes and the first letter is always N).
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Quote:
.Is there any significance of 'SS' here
kitchu84,
Substring(SS) format is used to check multiple values or find a value anywhere within a field value. Check this link for a better understanding of Substring Comparison.
Also, if in the sequence number i need to have numbering like N00000000001. (sequence is 12 bytes and the first letter is always N)
That is quite simple. All you are doing is making the sequm a 11 byte field with N in front. If that is the case just change this statement in my original post
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Escapa,
I assumed that there can be other record types other than 'P' and 'B'. If OP is sure of the record types then we can use When=init. The provided solutions takes care even when they have different record types.