MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
anaik Beginner Joined: 31 Jan 2007 Posts: 20 Topics: 6
Posted: Thu Sep 20, 2007 10:45 am Post subject: Easy retreive : get current date
In the below code in the comment
' FILE EMPTY-INSERTED BY + TST TEAM DATE: 09/20/2007'
i want to pick up the date from the system. But not sure how to do it using easyretrieve. Please advise
Code:
//TEST2 JOB (9955YC35),'TEST', 0000000
// CLASS=F,MSGCLASS=Y,NOTIFY=&SYSUID,USER=&SYSUID 0000000
//* 0000000
//CA11 EXEC CA11,PARM='F' 0000000
//STEP05R EXEC PGM=EZTPA00 0000000
//STEPLIB DD DSN=SYS1.EZTRVE.V60.LINKLIB,DISP=SHR 0000000
//EZTVFM DD UNIT=SYSDA,SPACE=(8192,(9000,5000),RLSE,,ROUND) 0000000
//* 0000000
//EXTRACT1 DD DISP=SHR, 0000000
// DSN=FAAPRAL.REPT.TSD16001.REPORT01.DX072611 0000000
//* 0000000
//*DETAIL1 DD DISP=SHR, 0000000
//* DSN=SVWTGP01.GPTRSA10
//* 0000000
//OUTPUT1 DD DISP=(NEW,CATLG,DELETE), 0000000
// DSN=TEST.TEST.TST809NA.ONE, 0000000
// DCB=(RECFM=FB,LRECL=134,BLKSIZE=27872),
// SPACE=(CYL,(2000,200),RLSE)
//OUTPUT2 DD DISP=(NEW,CATLG,DELETE), 0000000
// DSN=TEST.TEST.TST809NA.TWO, 0000000
// DCB=(RECFM=FB,LRECL=134,BLKSIZE=27872),
// SPACE=(CYL,(2000,200),RLSE)
//* 0000000
//SYSOUT DD SYSOUT=* 0000000
//SYSPRINT DD SYSOUT=* 0000000
//SYSUDUMP DD SYSOUT=* 0000000
//** 0000000
//SYSIN DD * 0000000
LIST ON 0000000
DEFINE COUNT1 W 6 N VALUE 0
DEFINE COUNT2 W 6 N VALUE 0
DEFINE TEMPOR W 80 A VALUE ' FILE EMPTY-INSERTED BY +
TST TEAM DATE: 09/20/2007'
FILE EXTRACT1 FB(134 27872)
CC-TYPEI 1 1 A
PURPLE 2 1 A
DATAI 3 132 A
*FILE TEMP FB(10 100)
* TEMPOR 1 10 A
FILE OUTPUT1
* 0000000
CC-TYPE1 1 1 A
DATA1 2 132 A
SPACES1 133 1 A
* 0000000
FILE OUTPUT2
* 0000000
CC-TYPE2 1 1 A
DATA2 2 132 A
SPACES2 133 1 A
* 0000000
JOB INPUT NULL 0000000
GET EXTRACT1
IF EOF EXTRACT1
IF COUNT1 = 0
MOVE SPACES TO CC-TYPE1
MOVE TEMPOR TO DATA1
MOVE SPACES TO SPACES1
PUT OUTPUT1
END-IF
IF COUNT2 = 0
MOVE SPACES TO CC-TYPE2
MOVE TEMPOR TO DATA2
DISPLAY 'COUNT2' COUNT2
MOVE SPACES TO SPACES2
PUT OUTPUT2
END-IF
STOP
END-IF
IF PURPLE = '1' 0000000
MOVE CC-TYPEI TO CC-TYPE1
MOVE DATAI TO DATA1
MOVE SPACES TO SPACES1
* DISPLAY 'COUNT1' COUNT1
COUNT1 = COUNT1 + 1
PUT OUTPUT1
END-IF.
IF PURPLE = 'Z' 0000000
MOVE CC-TYPEI TO CC-TYPE2
MOVE DATAI TO DATA2
MOVE SPACES TO SPACES2
COUNT2 = COUNT2 + 1
PUT OUTPUT2
END-IF.
* 0000000
GO TO JOB 0000000
/*
[/code]
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Back to top
anaik Beginner Joined: 31 Jan 2007 Posts: 20 Topics: 6
Posted: Thu Sep 20, 2007 11:21 am Post subject:
Kolusu,
i agree with you. i am coding it for the first time.
how do i pass the variable CURRENT-DATE to TEMPOR variable. i have added the below code to my existing code
Code:
CURRENT-DATE W 10 A
CURRENT-MM CURRENT-DATE 02 A
CURRENT-DD CURRENT-DATE +3 02 A
CURRENT-YY CURRENT-DATE +6 04 A
JOB INPUT NULL
CURRENT-DATE = SYSDATE . * MOVE ALL 8
DISPLAY CURRENT-DATE ' ' CURRENT-DATE
Back to top
CraigG Intermediate Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
Posted: Thu Sep 20, 2007 3:11 pm Post subject:
Are you planning on continuing this topic at this site or are you going to continue it at both sites.
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Back to top
anaik Beginner Joined: 31 Jan 2007 Posts: 20 Topics: 6
Posted: Thu Sep 20, 2007 3:32 pm Post subject:
i am sorry.. Will follow the rules
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum