Problem With Subfiles: Automatic Realignment of ITEMS
vamsi krishna
vamsi.coe at gmail.com
Fri Dec 14 09:20:44 CST 2007
Hello All,
I've problems while creating system interfaces using subfiles.
Subfile definition looks something like this:
DEFINE REC-ID CHAR*4 = "0010"
DEFINE CHARGES CHAR*14 = ""
DEFINE C-LLC CHAR*14 = **something
DEFINE C-LCC CHAR*14 = **something
DEFINE C-PSX CHAR*2 = **something
DEFINE C-PCD CHAR*3 = **something
DEFINE C-UNT CHAR*8 = **something
DEFINE RECORD-DAS CHAR*183 = DEK OF NS-RECORD + &
BNI OF PD-RECORD + &
MULT$S_OF_PTS OF NS-RECORD + &
CHARGES + &
C-LLC + &
C-LCC + &
FRA OF NS-RECORD + &
C-PSX + &
C-PCD + &
ESG OF NS-RECORD + &
C-UNT + &
WCP OF NS-RECORD + &
WC2 OF NS-RECORD + &
PST OF NS-RECORD + &
MAS OF CB-RECORD + &
CUM OF CB-RECORD
DEFINE NLSVINT CHAR*1= "N" IF NLSR$S_OF_PTS OF NS-RECORD = "N" ELSE "Y"
SUBFILE $PIC_DATA/OPNLSVINT1 KEEP &
INCLUDE REC-ID, &
PRN OF NS-RECORD, &
CAT OF NS-RECORD, &
MER OF NS-RECORD, &
RECORD-DAS, &
NLSVINT &
INDEX PRN UNIQUE &
SEGMENT PRN
When I create this subfile for the first time, sho item command displays:
REC-ID CHAR X(4)
* PRN CHAR X(12)
CAT CHAR X(12)
MER CHAR X(12)
RECORD-DAS CHAR X(183)
NLSVINT CHAR X(1)
In the first run, to compare data of previous day, we create one more
subfile:
ACCESS *$PIC_DATA/OPNLSVINT1
SELECT IF REC-ID <> REC-ID
SUBFILE $PIC_DATA/OPNLSVINT2 KEEP APPEND &
INCLUDE OPNLSVINT1 &
INDEX PRN UNIQUE &
SEGMENT PRN
At the end of job execution it renames OPNLSVINT1 to OPNLSVINT2 (
.dat,.sfd,.idx ) and creates OPNLSVINT1 next day with comparison with
OPNLSVINT2 of previous day.
And when I run the job again...., and the do a sho ite command, it
displays:
OPNLSVINT2 TYPE SCALE SCALE DEC PICTURE
REC-ID CHAR X(4)
* PRN CHAR X(12)
CAT CHAR X(12)
MER CHAR X(12)
NLSVINT CHAR X(1)
RECORD-DAS CHAR X(183)
As you the single character flag precedes the 183 character item now.. which
automatically changes the Layout(data in output).
Could anyone provide any comment/hints to fix this?
Sorry if I'm spamming your mail box. :-)
Thanks in advance.
Regards,
Vamsi
--
"Nothing is impossible as impossible itself says i m possible"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20071214/0f46139b/attachment.htm
More information about the powerh-l
mailing list